Commit ce4e0a61 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

Add support for making a build environment without editing the source

and spec files.
parent 943e761d
......@@ -3,7 +3,7 @@
# Copyright 2000 Francois Gouget for CodeWeavers
# fgouget@codeweavers.com
#
my $version="0.5.7";
my $version="0.5.8";
use Cwd;
use File::Basename;
......@@ -65,6 +65,11 @@ my $opt_lower;
# 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_ask_target_options;
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 @@ sub fix_source
# 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_is_interactive=$OPT_ASK_NO;
$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 print_banner
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 @@ while (@ARGV>0) {
$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 @@ source_scan();
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment