Add support for making a build environment without editing the source
and spec files.
This commit is contained in:
parent
943e761db7
commit
ce4e0a6158
|
@ -3,7 +3,7 @@
|
||||||
# Copyright 2000 Francois Gouget for CodeWeavers
|
# Copyright 2000 Francois Gouget for CodeWeavers
|
||||||
# fgouget@codeweavers.com
|
# fgouget@codeweavers.com
|
||||||
#
|
#
|
||||||
my $version="0.5.7";
|
my $version="0.5.8";
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
@ -65,6 +65,11 @@ my $opt_lower;
|
||||||
# If we don't find the file referenced by an include, lower it
|
# If we don't find the file referenced by an include, lower it
|
||||||
my $opt_lower_include;
|
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
|
# Options for the 'Source' method
|
||||||
|
|
||||||
|
@ -98,6 +103,11 @@ my $opt_ask_target_options;
|
||||||
# no makefiles, but also no .spec files, no configure.in, etc.
|
# no makefiles, but also no .spec files, no configure.in, etc.
|
||||||
my $opt_no_generated_files;
|
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.
|
# Specifies not to print the banner if set.
|
||||||
my $opt_no_banner;
|
my $opt_no_banner;
|
||||||
|
@ -1564,6 +1574,9 @@ sub fix_source
|
||||||
# Generates a target's .spec file
|
# Generates a target's .spec file
|
||||||
sub generate_spec_file
|
sub generate_spec_file
|
||||||
{
|
{
|
||||||
|
if ($opt_no_generated_specs) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
my $path=$_[0];
|
my $path=$_[0];
|
||||||
my $target=$_[1];
|
my $target=$_[1];
|
||||||
my $project_settings=$_[2];
|
my $project_settings=$_[2];
|
||||||
|
@ -2116,6 +2129,8 @@ $opt_is_interactive=$OPT_ASK_NO;
|
||||||
$opt_ask_project_options=$OPT_ASK_NO;
|
$opt_ask_project_options=$OPT_ASK_NO;
|
||||||
$opt_ask_target_options=$OPT_ASK_NO;
|
$opt_ask_target_options=$OPT_ASK_NO;
|
||||||
$opt_no_generated_files=0;
|
$opt_no_generated_files=0;
|
||||||
|
$opt_no_generated_specs=0;
|
||||||
|
$opt_no_source_fix=0;
|
||||||
$opt_no_banner=0;
|
$opt_no_banner=0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2135,14 +2150,14 @@ sub print_banner
|
||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
print_banner();
|
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-none|--lower-all|--lower-uppercase]\n";
|
||||||
print STDERR " [--lower-include|--nolower-include]\n";
|
print STDERR " [--lower-include|--nolower-include]\n";
|
||||||
print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll]\n";
|
print STDERR " [--guiexe|--windows|--cuiexe|--console|--dll]\n";
|
||||||
print STDERR " [--wrap|--nowrap] [--mfc|--nomfc]\n";
|
print STDERR " [--wrap|--nowrap] [--mfc|--nomfc]\n";
|
||||||
print STDERR " [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n";
|
print STDERR " [-Dmacro[=defn]] [-Idir] [-Pdir] [-idll] [-Ldir] [-llibrary]\n";
|
||||||
print STDERR " [--interactive] [--single-target name]\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 " work_directory\n";
|
||||||
print STDERR "\nWinemaker is designed to recursively convert all the Windows sources found in\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";
|
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;
|
$opt_lower_include=1;
|
||||||
} elsif ($arg eq "--nolower-include") {
|
} elsif ($arg eq "--nolower-include") {
|
||||||
$opt_lower_include=0;
|
$opt_lower_include=0;
|
||||||
|
} elsif ($arg eq "--nosource-fix") {
|
||||||
|
$opt_no_source_fix=1;
|
||||||
} elsif ($arg eq "--generated-files") {
|
} elsif ($arg eq "--generated-files") {
|
||||||
$opt_no_generated_files=0;
|
$opt_no_generated_files=0;
|
||||||
} elsif ($arg eq "--nogenerated-files") {
|
} elsif ($arg eq "--nogenerated-files") {
|
||||||
$opt_no_generated_files=1;
|
$opt_no_generated_files=1;
|
||||||
|
} elsif ($arg eq "--nogenerated-specs") {
|
||||||
|
$opt_no_generated_specs=1;
|
||||||
|
|
||||||
} elsif ($arg =~ /^-D/) {
|
} elsif ($arg =~ /^-D/) {
|
||||||
push @{$global_settings[$T_DEFINES]},$arg;
|
push @{$global_settings[$T_DEFINES]},$arg;
|
||||||
|
@ -2254,7 +2273,9 @@ source_scan();
|
||||||
postprocess_targets();
|
postprocess_targets();
|
||||||
|
|
||||||
# Fix the source files
|
# Fix the source files
|
||||||
|
if (! $opt_no_source_fix) {
|
||||||
fix_source();
|
fix_source();
|
||||||
|
}
|
||||||
|
|
||||||
# Generate the Makefile and the spec file
|
# Generate the Makefile and the spec file
|
||||||
if (! $opt_no_generated_files) {
|
if (! $opt_no_generated_files) {
|
||||||
|
|
Loading…
Reference in New Issue