summaryrefslogtreecommitdiff
path: root/pod/pod2man.PL
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-26 12:43:02 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-26 12:43:02 +0000
commit3b5ca523bc72bce199abcb9d5ec13af5913a4d2d (patch)
tree7c65f45ab947422d1c0c9bfcf5471d1b92e240e1 /pod/pod2man.PL
parenteda383f202c9baaca6fdea3cf178e40686e8a3bb (diff)
downloadperl-3b5ca523bc72bce199abcb9d5ec13af5913a4d2d.tar.gz
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@3774
Diffstat (limited to 'pod/pod2man.PL')
-rw-r--r--pod/pod2man.PL10
1 files changed, 7 insertions, 3 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index 37557bf560..20610a84c3 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.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
@@ -11,11 +12,13 @@ use File::Basename qw(&basename &dirname);
# $man3ext
# to ensure Configure will look for $Config{startperl}.
-$file = basename($0);
-$file =~ s/\.PL$//i;
+# 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';
-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";
@@ -1231,3 +1234,4 @@ BEGIN {
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;