winemaker: add project-parse function
Francois Gouget
fgouget at free.fr
Thu Mar 5 12:16:34 CST 2009
Here are some quick comments:
You cannot add functions that are not used. So this patch should include
the following lines from patch 0004:
+ if (defined $opt_work_dir) {
+ # Now scan the directory tree looking for source files and, maybe, targets
+ print "Scanning the source directories...\n";
+ source_scan_directory(\@main_project,"","",0);
+ @projects=sort { @$a[$P_PATH] cmp @$b[$P_PATH] } @projects;
+ } elsif (defined $opt_work_file) {
+ if ($opt_work_file =~ /.dsp$/i or $opt_work_file =~ /.vcproj$/i) {
+ source_scan_project_file(\@main_project,0,$opt_work_file);
+ }
And the relevant $opt_work_file lines so that it's functional.
The vcproj parser is still pushing compilation options only to CXXEXTRA.
I believe dsp files can only have one target. Can vcproj files
have multiple targets? If not it should be possible to avoid the loop on
%targets.
Also, I think the dsp parser at least does not need @std_imports because
if I'm not mistaken all the libraries to link with are explicitely
mentionned in the file. It also seems like we should not have to play
guessing games to 'Match sources'. So I think it should be possible to
simplify that part of the code.
The patch does not use $has_headers anymore but it still declares and
sets it. Still a few unneeded '."' and '".' (concatenation issues).
Could you move source_scan_project_file() and
source_scan_workspace_file() above source_scan_directory()? That way
later on the latter will be able to call the former without having to
reorder the functions.
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
"Utilisateur" (nom commun) :
Mot utilisé par les informaticiens en lieu et place d'"idiot".
More information about the wine-devel
mailing list