winemaker: Process the files in 'include' directories
François Gouget
fgouget at codeweavers.com
Thu Mar 1 16:38:23 CST 2001
Some time ago I added a functionality so that winemaker would
automatically guess that directories called 'include' should be put in
the include path. Unfortunately this had the side effect that winemaker
stopped fixing the files in such directories.
This patch fixes this unfortunate side-effect.
It fixes:
http://wine.codeweavers.com/bugzilla/show_bug.cgi?id=163
Changelog:
François Gouget <fgouget at codeweavers.com>
* tools/winemaker
Fix for #163
Add files found in an 'include' directory, to the 'misc sources' list
--
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: tools/winemaker
===================================================================
RCS file: /home/wine/wine/tools/winemaker,v
retrieving revision 1.16
diff -u -r1.16 winemaker
--- tools/winemaker 2001/02/12 01:22:58 1.16
+++ tools/winemaker 2001/02/27 19:15:33
@@ -442,6 +442,9 @@
# the name of this directory, including a trailing '/', or an empty
# string if this is the top level directory
my $dirname=$_[2];
+ # if set then no targets will be looked for and the sources will all
+ # end up in the parent_project's 'misc' bucket
+ my $no_target=$_[3];
# reference to the project for this directory. May not be used
my $project;
@@ -494,11 +497,12 @@
} elsif ($dentry =~ /^include/i) {
# This directory must contain headers we're going to need
push @{@$project_settings[$T_INCLUDE_PATH]},"-I$dentry";
+ source_scan_directory($project,"$fullentry/","$dentry/",1);
} else {
# Recursively scan this directory. Any source file that cannot be
- # attributed to a project in one of the subdirectories will be attributed
- # to this project.
- source_scan_directory($project,"$fullentry/","$dentry/");
+ # attributed to a project in one of the subdirectories will be
+ # attributed to this project.
+ source_scan_directory($project,"$fullentry/","$dentry/",$no_target);
}
} elsif (-f "$fullentry") {
if ($dentry =~ s/\.exe$//i) {
@@ -545,6 +549,14 @@
push @{@$target[$T_SOURCES_MISC]},map "$path$_", at sources_misc;
return;
}
+ if ($no_target) {
+ my $parent_settings=@$parent_project[$P_SETTINGS];
+ push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_", at sources_c;
+ push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_", at sources_cxx;
+ push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_", at sources_rc;
+ push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_", at sources_misc;
+ return;
+ }
my $source_count=@sources_c+ at sources_cxx+@sources_rc+
@{@$project_settings[$T_SOURCES_C]}+
@@ -553,7 +565,7 @@
if ($source_count == 0) {
# A project without real sources is not a project, get out!
if ($project!=$parent_project) {
- $parent_settings=@$parent_project[$P_SETTINGS];
+ my $parent_settings=@$parent_project[$P_SETTINGS];
push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_", at sources_misc;
push @{@$parent_settings[$T_SOURCES_MISC]},map "$dirname$_",@{@$project_settings[$T_SOURCES_MISC]};
}
@@ -901,7 +913,7 @@
# Now scan the directory tree looking for source files and, maybe, targets
print "Scanning the source directories...\n";
- source_scan_directory(\@main_project,"","");
+ source_scan_directory(\@main_project,"","",0);
@projects=sort { @$a[$P_PATH] cmp @$b[$P_PATH] } @projects;
}
More information about the wine-patches
mailing list