winemaker support for not changing source or spec

Medland, Bill Bill.Medland at accpac.com
Fri Sep 21 13:37:03 CDT 2001


-------------- next part --------------
Bill Medland (medbi01 at accpac.com)
Add support for making a build environment without editing the source
and spec files.

Index: wine/tools/winemaker
===================================================================
RCS file: /home/wine/wine/tools/winemaker,v
retrieving revision 1.31
diff -u -r1.31 winemaker
--- wine/tools/winemaker	2001/07/30 18:44:48	1.31
+++ wine/tools/winemaker	2001/09/21 17:21:41
@@ -3,7 +3,7 @@
 # Copyright 2000 Francois Gouget for CodeWeavers
 # fgouget at codeweavers.com
 #
-my $version="0.5.7";
+my $version="0.5.8";
 
 use Cwd;
 use File::Basename;
@@ -65,6 +65,11 @@
 # If we don't find the file referenced by an include, lower it
 my $opt_lower_include;
 
+##
+# If true then winemaker should not attempt to fix the source.  This is
+# useful if the source is known to be already in a suitable form and is
+# readonly
+my $opt_no_source_fix;
 
 # Options for the 'Source' method
 
@@ -99,6 +104,11 @@
 my $opt_no_generated_files;
 
 ##
+# If true then winemaker should not generate the spec files.
+# This is useful if winemaker is being used to create a build environment
+my $opt_no_generated_specs;
+
+##
 # Specifies not to print the banner if set.
 my $opt_no_banner;
 
@@ -1564,6 +1574,9 @@
 # Generates a target's .spec file
 sub generate_spec_file
 {
+  if ($opt_no_generated_specs) {
+    return;
+  }
   my $path=$_[0];
   my $target=$_[1];
   my $project_settings=$_[2];
@@ -2116,6 +2129,8 @@
 $opt_ask_project_options=$OPT_ASK_NO;
 $opt_ask_target_options=$OPT_ASK_NO;
 $opt_no_generated_files=0;
+$opt_no_generated_specs=0;
+#opt_no_source_fix=0;
 $opt_no_banner=0;
 
 
@@ -2135,14 +2150,14 @@
 sub usage
 {
   print_banner();
-  print STDERR "Usage: winemaker [--nobanner] [--backup|--nobackup]\n";
+  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]\n";
   print STDERR "                 [--guiexe|--windows|--cuiexe|--console|--dll]\n";
   print STDERR "                 [--wrap|--nowrap] [--mfc|--nomfc]\n";
   print STDERR "                 [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n";
   print STDERR "                 [--interactive] [--single-target name]\n";
-  print STDERR "                 [--generated-files|--nogenerated-files]\n";
+  print STDERR "                 [--generated-files|--nogenerated-files] [--nogenerated-specs]\n";
   print STDERR "                 work_directory\n";
   print STDERR "\nWinemaker is designed to recursively convert all the Windows sources found in\n";
   print STDERR "the specified directory so that they can be compiled with Winelib. During this\n";
@@ -2175,10 +2190,14 @@
     $opt_lower_include=1;
   } elsif ($arg eq "--nolower-include") {
     $opt_lower_include=0;
+  } elsif ($arg eq "--nosource-fix") {
+    $opt_no_source_fix=1;
   } elsif ($arg eq "--generated-files") {
     $opt_no_generated_files=0;
   } elsif ($arg eq "--nogenerated-files") {
     $opt_no_generated_files=1;
+  } elsif ($arg eq "--nogenerated-specs") {
+    $opt_no_generated_specs=1;
 
   } elsif ($arg =~ /^-D/) {
     push @{$global_settings[$T_DEFINES]},$arg;
@@ -2254,7 +2273,9 @@
 postprocess_targets();
 
 # Fix the source files
-fix_source();
+if (! $opt_no_source_fix) {
+  fix_source();
+}
 
 # Generate the Makefile and the spec file
 if (! $opt_no_generated_files) {


More information about the wine-patches mailing list