From: Max Maischein Date: Thu, 24 Sep 2009 19:07:15 +0000 (+0200) Subject: Make make_ext changedir work with multiple scanned directories on Win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2ac9a71fd041588f93167970d1121ded5605f26;p=p5sagit%2Fp5-mst-13.2.git Make make_ext changedir work with multiple scanned directories on Win32 --- diff --git a/make_ext.pl b/make_ext.pl index e606c36..17f1227 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -170,9 +170,10 @@ if ($is_Win32) { system(@args) unless defined $::Cross::platform; } - print "In ", getcwd(); + my $build = getcwd(); + print "In $build"; foreach my $dir (@dirs) { - chdir($dir) || die "Cannot cd to $dir\n"; + chdir($dir) or die "Cannot cd to $dir: $!\n"; (my $ext = getcwd()) =~ s{/}{\\}g; FindExt::scan_ext($ext); FindExt::set_static_extensions(split ' ', $Config{static_ext}); @@ -200,8 +201,11 @@ if ($is_Win32) { push @{$extra_passthrough{$_}}, 'LINKTYPE=static'; } } - chdir '..'; # now in the Perl build directory + chdir $build + or die "Couldn't chdir to '$build': $!"; # restore our start directory } + chdir '..' + or die "Couldn't chdir to build directory: $!"; # now in the Perl build directory } elsif ($is_VMS) { $perl = $^X;