summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
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;