summaryrefslogtreecommitdiff
path: root/pod/pod2html.PL
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-25 12:27:20 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-25 12:27:20 +0000
commitb233458bd1d5037ce4bbbb41fb513e1b68522a4d (patch)
treec536cfd69a2b5a6fd972074b496e5ef5473cc69c /pod/pod2html.PL
parent781b178c230df22350b5995b4bfdfeb294912a39 (diff)
downloadperl-b233458bd1d5037ce4bbbb41fb513e1b68522a4d.tar.gz
First steps of making builds outside the source
directory possible. These should get us as far as miniperl, then building DynaLoader falls into tiny twinkling pieces as MakeMaker knows nothing of VPATH mindset. p4raw-id: //depot/cfgperl@3735
Diffstat (limited to 'pod/pod2html.PL')
-rw-r--r--pod/pod2html.PL11
1 files changed, 4 insertions, 7 deletions
diff --git a/pod/pod2html.PL b/pod/pod2html.PL
index 366dc163bf..746e101e49 100644
--- a/pod/pod2html.PL
+++ b/pod/pod2html.PL
@@ -2,7 +2,6 @@
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
@@ -11,13 +10,11 @@ use Cwd;
# $startperl
# to ensure Configure will look for $Config{startperl}.
-# 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 = basename($0);
+$file =~ s/\.PL$//i;
$file .= '.com' if $^O eq 'VMS';
+chdir("pod") or die "Can't chdir to pod: $!";
open OUT,">$file" or die "Can't create $file: $!";
print "Extracting $file (with variable substitutions)\n";
@@ -180,4 +177,4 @@ pod2html @ARGV;
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;
+