diff options
author | Max Maischein <corion@corion.net> | 2009-09-24 21:07:15 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-09-24 20:27:28 +0100 |
commit | a2ac9a71fd041588f93167970d1121ded5605f26 (patch) | |
tree | d3fec4855a8e4b7fd3a94c56cc90110964162998 | |
parent | 0189e3e0c11fda5109423cb9a66f65ea9ad2d2e5 (diff) | |
download | perl-a2ac9a71fd041588f93167970d1121ded5605f26.tar.gz |
Make make_ext changedir work with multiple scanned directories on Win32
-rw-r--r-- | make_ext.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/make_ext.pl b/make_ext.pl index e606c36604..17f1227289 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; |