Francois Gouget : winemaker: Fix handling of the global settings specified on the command line.
Alexandre Julliard
julliard at winehq.org
Wed Feb 25 09:22:44 CST 2009
Module: wine
Branch: master
Commit: 786a2cda6415564e2d93164f83725aa5fcda800f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=786a2cda6415564e2d93164f83725aa5fcda800f
Author: Francois Gouget <fgouget at free.fr>
Date: Wed Feb 25 10:33:48 2009 +0100
winemaker: Fix handling of the global settings specified on the command line.
Now that we no longer have a global Make.rules file, include them in
each Makefile.
---
tools/winemaker | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/tools/winemaker b/tools/winemaker
index 078ef44..56597c3 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -307,13 +307,18 @@ my $P_TARGETS=2;
# - set the project's path
# - initialize the target list
# - create a default target (will be removed later if unnecessary)
-sub project_init($$)
+sub project_init($$$)
{
- my $project=$_[0];
- my $path=$_[1];
+ my ($project, $path, $global_settings)=@_;
my $project_settings=[];
target_init($project_settings);
+ @$project_settings[$T_DEFINES]=[@{@$global_settings[$T_DEFINES]}];
+ @$project_settings[$T_INCLUDE_PATH]=[@{@$global_settings[$T_INCLUDE_PATH]}];
+ @$project_settings[$T_DLL_PATH]=[@{@$global_settings[$T_DLL_PATH]}];
+ @$project_settings[$T_DLLS]=[@{@$global_settings[$T_DLLS]}];
+ @$project_settings[$T_LIBRARY_PATH]=[@{@$global_settings[$T_LIBRARY_PATH]}];
+ @$project_settings[$T_LIBRARIES]=[@{@$global_settings[$T_LIBRARIES]}];
@$project[$P_PATH]=$path;
@$project[$P_SETTINGS]=$project_settings;
@@ -551,7 +556,7 @@ sub source_scan_directory($$$$)
$project=$parent_project;
} else {
$project=[];
- project_init($project,$path);
+ project_init($project, $path, \@global_settings);
}
my $project_settings=@$project[$P_SETTINGS];
@@ -1622,8 +1627,10 @@ sub generate_project_files($)
generate_list("CEXTRA",1,@$project_settings[$T_CEXTRA]);
generate_list("CXXEXTRA",1,@$project_settings[$T_CXXEXTRA]);
generate_list("RCEXTRA",1,@$project_settings[$T_RCEXTRA]);
+ generate_list("DEFINES",1,@$project_settings[$T_DEFINES]);
generate_list("INCLUDE_PATH",1,@$project_settings[$T_INCLUDE_PATH]);
generate_list("DLL_PATH",1,@$project_settings[$T_DLL_PATH]);
+ generate_list("DLL_IMPORTS",1,@$project_settings[$T_DLLS]);
generate_list("LIBRARY_PATH",1,@$project_settings[$T_LIBRARY_PATH]);
generate_list("LIBRARIES",1,@$project_settings[$T_LIBRARIES]);
print FILEO "\n\n";
@@ -1748,7 +1755,7 @@ sub generate_project_files($)
if (@{@$project[$P_TARGETS]} > 0) {
print FILEO "### Target specific build rules\n";
- print FILEO "DEFLIB = \$(LIBRARY_PATH) \$(LIBRARIES) \$(DLL_PATH)\n\n";
+ print FILEO "DEFLIB = \$(LIBRARY_PATH) \$(LIBRARIES) \$(DLL_PATH) \$(DLL_IMPORTS:%=-l%)\n\n";
foreach my $target (@{@$project[$P_TARGETS]}) {
my $canon=canonize("@$target[$T_NAME]");
$canon =~ s/_so$//;
@@ -1933,7 +1940,7 @@ if ($opt_no_banner == 0) {
print_banner();
}
-project_init(\@main_project,"");
+project_init(\@main_project, "", \@global_settings);
# Fix the file and directory names
fix_file_and_directory_names(".");
More information about the wine-cvs
mailing list