summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorMax Maischein <corion@corion.net>2009-09-24 21:07:15 +0200
committerNicholas Clark <nick@ccl4.org>2009-09-24 20:27:28 +0100
commita2ac9a71fd041588f93167970d1121ded5605f26 (patch)
treed3fec4855a8e4b7fd3a94c56cc90110964162998 /make_ext.pl
parent0189e3e0c11fda5109423cb9a66f65ea9ad2d2e5 (diff)
downloadperl-a2ac9a71fd041588f93167970d1121ded5605f26.tar.gz
Make make_ext changedir work with multiple scanned directories on Win32
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl10
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;