summaryrefslogtreecommitdiff
path: root/utils/perlcc.PL
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>1998-06-11 08:27:15 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-12 07:06:02 +0000
commit8a5546a1774bc5278c3b557b5a3cac8da26aa636 (patch)
treea2a4a2baba9046c655a7545eee579cca732513ae /utils/perlcc.PL
parent0c815be9f490bd7db5177b102e9ec25d74b97f4f (diff)
downloadperl-8a5546a1774bc5278c3b557b5a3cac8da26aa636.tar.gz
Re: [PATCH for _66] Makefile.SH problem on dos/djgpp
Message-Id: <Pine.SUN.3.96.980611122249.18493J-100000@newton.phys> p4raw-id: //depot/perl@1122
Diffstat (limited to 'utils/perlcc.PL')
-rw-r--r--utils/perlcc.PL4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/perlcc.PL b/utils/perlcc.PL
index af7488f484..5d9585b3fb 100644
--- a/utils/perlcc.PL
+++ b/utils/perlcc.PL
@@ -2,6 +2,7 @@
use Config;
use File::Basename qw(&basename &dirname);
+use Cwd;
# List explicitly here the variables you want Configure to
# generate. Metaconfig only looks for shell variables, so you
@@ -13,6 +14,7 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
+$origdir = cwd;
chdir dirname($0);
$file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
@@ -38,6 +40,7 @@ use Config;
use strict;
use FileHandle;
use File::Basename qw(&basename &dirname);
+use Cwd;
use Getopt::Long;
@@ -933,3 +936,4 @@ by perl5.005.
close OUT or die "Can't close $file: $!";
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
+chdir $origdir;