Hello, I am not 100% sure if this is correct as I dont have a Windows box handy and dont know perl but this has been a known bug where msvcmaker did not properly build Makefiles when using Perl on Windows. A anonymous slashdot reader sent me this patch to fix this oversite. He saif to either attribute the changelog entry to Fred Patrik or to me.
If someone has a Windows box handy could you test msvcmaker with this patch and see if it generates the makefiles properly now? Thanks Steven Changelog: Fix generation of MS_VC Makfiles on Windows __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
Index: msvcmaker =================================================================== RCS file: /home/wine/wine/tools/winapi/msvcmaker,v retrieving revision 1.23 diff -u -b -r1.23 msvcmaker --- msvcmaker 22 Mar 2004 21:29:53 -0000 1.23 +++ msvcmaker 28 May 2004 18:06:40 -0000 @@ -4,43 +4,73 @@ use strict; -BEGIN { - $0 =~ m%^(.*?/?tools)/winapi/msvcmaker$%; +use vars qw/$current_dir $wine_dir $winapi_dir $winapi_check_dir $output/; + +BEGIN +{ + if ( $0 =~ m%^(.*?/?tools)/winapi/msvcmaker$% ) + { require "$1/winapi/setup.pm"; + } + else + { + if ( -e "./setup.pm" ) + { + require "./setup.pm"; + } + elsif ( -e "./winapi/setup.pm" ) + { + require "./winapi/setup.pm"; + } + elsif ( -e "./tools/winapi/setup.pm" ) + { + require "./tools/winapi/setup.pm"; + } + else + { + print STDERR "\n\nCannot find setup.pm from the current directory: ". Cwd::cwd() . "\n"; + exit 1; + } + } } -use config qw(&file_directory &get_spec_files &get_makefile_in_files $current_dir $wine_dir); +use lib $setup::winapi_dir; use output qw($output); +use winconfig qw(file_directory get_spec_files get_makefile_in_files $current_dir $wine_dir); use util qw(replace_file); use msvcmaker_options qw($options); if($options->progress) { - $output->enable_progress; + $output::output->enable_progress; } else { - $output->disable_progress; + $output::output->disable_progress; } ######################################################################## # main +######################################################################## -my @spec_files = get_spec_files("winelib"); -my @makefile_in_files = get_makefile_in_files("winelib"); +my @spec_files = winconfig::get_spec_files("winelib"); +my @makefile_in_files = winconfig::get_makefile_in_files("winelib"); my $wine = 1; my $output_prefix_dir = "Output"; my $no_release = 1; -if ($options->wine || $options->winetest) { - foreach my $spec_file (@spec_files) { +if ($options->wine || $options->winetest) +{ + foreach my $spec_file (@spec_files) + { read_spec_file($spec_file); } } my %modules; -sub read_spec_file { +sub read_spec_file +{ my $spec_file = shift; my $module = $spec_file; @@ -49,7 +79,7 @@ my $type = "win32"; - open(IN, "< $wine_dir/$spec_file"); + open(IN, "< $setup::wine_dir/$spec_file"); my $header = 1; my $lookahead = 0; @@ -58,7 +88,7 @@ s/^\s*?(.*?)\s*$/$1/; # remove whitespace at begining and end of line s/^(.*?)\s*#.*$/$1/; # remove comments - /^$/ && next; # skip empty lines + m/^$/ && next; # skip empty lines if($header) { if(/^\d+|@/) { @@ -113,7 +143,7 @@ my %wine_test_dsp_files; MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { - open(IN, "< $wine_dir/$makefile_in_file"); + open(IN, "< $setup::wine_dir/$makefile_in_file"); my $topobjdir; my $module; @@ -437,7 +467,7 @@ foreach my $module (@modules) { my $dsp_file = $modules{$module}{dsp_file}; - replace_file("$wine_dir/$dsp_file", \&_generate_dsp, $module); + replace_file("$setup::wine_dir/$dsp_file", \&_generate_dsp, $module); } sub _generate_dsp { @@ -1028,20 +1058,25 @@ if ($options->wine) { my $dsw_file = "wine.dsw"; $output->progress("$dsw_file"); - replace_file("$wine_dir/$dsw_file", \&_generate_wine_dsw); + replace_file("$setup::wine_dir/$dsw_file", \&_generate_wine_dsw); } sub _generate_wine_dsw { local *OUT = shift; _generate_dsw_header(\*OUT); - foreach my $module (sort(keys(%modules))) { + + foreach my $module (sort(keys(%modules))) + { next if $module =~ /(?:winetest\.lib|wineruntests\.exe|_test\.exe)$/; my $project = $modules{$module}{project}; my $dsp_file = $modules{$module}{dsp_file}; my @dependencies; + + next if ( !$project ); + if($project =~ /^wine(?:_unicode)?$/) { @dependencies = (); } elsif($project =~ /^winebuild$/) { @@ -1052,8 +1087,10 @@ @dependencies = ("wine", "wine_unicode", "winebuild"); } - if($project =~ /^gdi32$/) { - foreach my $dir (@gdi32_dirs) { + if($project =~ /^gdi32$/) + { + foreach my $dir (@gdi32_dirs) + { my $dir2 = $dir; $dir2 =~ s%^.*?/([^/]+)$%$1%; @@ -1061,17 +1098,22 @@ $module =~ s%/%_%g; push @dependencies, $module; } - } elsif($project =~ /^ntdll$/) { - foreach my $dir (@ntdll_dirs) { + } + elsif($project =~ /^ntdll$/) + { + foreach my $dir (@ntdll_dirs) + { my $module = "ntdll_$dir"; $module =~ s%/%_%g; push @dependencies, $module; } - } elsif($project =~ /^user32$/) { - foreach my $dir (@user32_dirs) { + } + elsif($project =~ /^user32$/) + { + foreach my $dir (@user32_dirs) + { my $dir2 = $dir; $dir2 =~ s%^.*?/([^/]+)$%$1%; - my $module = "user32_$dir2"; $module =~ s%/%_%g; push @dependencies, $module; @@ -1088,7 +1130,7 @@ if ($options->winetest) { my $dsw_file = "winetest.dsw"; $output->progress("$dsw_file"); - replace_file("$wine_dir/$dsw_file", \&_generate_winetest_dsw); + replace_file("$setup::wine_dir/$dsw_file", \&_generate_winetest_dsw); } sub _generate_winetest_dsw { @@ -1138,7 +1180,7 @@ my $testlist_c = $dsp_file; $testlist_c =~ s%[^/]*\.dsp$%testlist.c%; - replace_file("$wine_dir/$testlist_c", \&_generate_testlist_c, [EMAIL PROTECTED]); + replace_file("$setup::wine_dir/$testlist_c", \&_generate_testlist_c, [EMAIL PROTECTED]); } } @@ -1177,7 +1219,7 @@ } if ($options->winetest) { - replace_file("$wine_dir/runtests.c", \&_generate_runtests_c); + replace_file("$setup::wine_dir/runtests.c", \&_generate_runtests_c); } sub _generate_runtests_c { @@ -1214,7 +1256,7 @@ } if ($options->winetest) { - replace_file("$wine_dir/winetest.c", \&_generate_winetest_c); + replace_file("$setup::wine_dir/winetest.c", \&_generate_winetest_c); } sub _generate_winetest_c { @@ -1231,7 +1273,7 @@ $output->progress("$config_h"); - replace_file("$wine_dir/$config_h", \&_generate_config_h); + replace_file("$setup::wine_dir/$config_h", \&_generate_config_h); } sub _generate_config_h {