From 3abe79d71a201f4c81754bdf48c9c97f4a4b4921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 15 Jan 2012 18:02:57 +0100 Subject: [PATCH] winemaker: Add command line option for compiling static libraries. --- tools/winemaker | 12 +++++++++++- tools/winemaker.de.man.in | 9 ++++++--- tools/winemaker.man.in | 13 +++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/tools/winemaker b/tools/winemaker index 0e5ad18ea18..aaf0d9c70e6 100755 --- a/tools/winemaker +++ b/tools/winemaker @@ -1433,6 +1433,8 @@ sub source_scan_directory($$$$) $name =~ s+(/|\.[^.]*)$++; if ($opt_target_type == $TT_DLL) { $name = canonize($name).".dll"; + } elsif ($opt_target_type == $TT_LIB) { + $name = "lib".canonize($name).".a"; } else { $name = canonize($name).".exe"; } @@ -1551,6 +1553,12 @@ sub source_scan_directory($$$$) push @local_depends,"$target_name"; push @local_libs,$target_name; push @{@$target[$T_ARFLAGS]},("rc"); + } elsif ($target_name =~ /\.a$/) { + @$target[$T_NAME]=$target_name; + @$target[$T_TYPE]=$TT_LIB; + push @local_depends,"$target_name"; + push @local_libs,$target_name; + push @{@$target[$T_ARFLAGS]},("rc"); } else { @$target[$T_TYPE]=$opt_target_type; push @exe_list,$target; @@ -2630,7 +2638,7 @@ sub usage() print STDERR "Usage: winemaker [--nobanner] [--backup|--nobackup] [--nosource-fix]\n"; print STDERR " [--lower-none|--lower-all|--lower-uppercase]\n"; print STDERR " [--lower-include|--nolower-include] [--mfc|--nomfc]\n"; - print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll]\n"; + print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll|--lib]\n"; print STDERR " [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n"; print STDERR " [--nodlls] [--nomsvcrt] [--interactive] [--single-target name]\n"; print STDERR " [--generated-files|--nogenerated-files]\n"; @@ -2690,6 +2698,8 @@ while (@ARGV>0) { # 'Source'-based method options } elsif ($arg eq "--dll") { $opt_target_type=$TT_DLL; + } elsif ($arg eq "--lib") { + $opt_target_type=$TT_LIB; } elsif ($arg eq "--guiexe" or $arg eq "--windows") { $opt_target_type=$TT_GUIEXE; } elsif ($arg eq "--cuiexe" or $arg eq "--console") { diff --git a/tools/winemaker.de.man.in b/tools/winemaker.de.man.in index 8cca9d9f53c..e7f92b65305 100644 --- a/tools/winemaker.de.man.in +++ b/tools/winemaker.de.man.in @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.TH WINEMAKER 1 "April 2010" "@PACKAGE_STRING@" "Wine Developers Manual" +.TH WINEMAKER 1 "Januar 2012" "@PACKAGE_STRING@" "Wine Developers Manual" .SH NAME winemaker \- Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompilieren .SH ÜBERSICHT @@ -17,7 +17,7 @@ winemaker \- Erzeugt eine Buildumgebung um Windows Programme unter Unix zu kompi ] .br [ -.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " +.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib " ] .br [ @@ -118,7 +118,10 @@ Diese Option ist Standard. Gibt den Typ(Konsole) der zu erstellenden Anwendung an. .TP .B --dll -winemaker wird im Zweifelsfall annehmen, dass es sich um eine Bibliothek handelt. +winemaker wird im Zweifelsfall annehmen, dass es sich um eine DLL handelt. +.TP +.B --lib +winemaker wird im Zweifelsfall annehmen, dass es sich um eine statische Bibliothek handelt. .TP .B --mfc Teilt winemaker mit, dass es sich um MFC-basierten Quellcode handelt. diff --git a/tools/winemaker.man.in b/tools/winemaker.man.in index 1f6bc3cee93..f0a17cf80a2 100644 --- a/tools/winemaker.man.in +++ b/tools/winemaker.man.in @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.TH WINEMAKER 1 "Sep 2009" "@PACKAGE_STRING@" "Wine Developers Manual" +.TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual" .SH NAME winemaker \- generate a build infrastructure for compiling Windows programs on Unix .SH SYNOPSIS @@ -17,7 +17,7 @@ winemaker \- generate a build infrastructure for compiling Windows programs on U ] .br [ -.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " +.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib " ] .br [ @@ -120,8 +120,13 @@ unknown type, it should assume that it is a console application. .TP .B --dll This option tells winemaker that whenever it finds a target of unknown type, -i.e. for which it does not know whether it is an executable or a library, -it should assume it is a library. +i.e. for which it does not know whether it is an executable, a dll, or a static library, +it should assume it is a dll. +.TP +.B --lib +This option tells winemaker that whenever it finds a target of unknown type, +i.e. for which it does not know whether it is an executable, a dll, or a static library, +it should assume it is a static library. .TP .B --mfc Specifies that the targets are MFC based. In such a case winemaker adapts