X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fpod2html.PL;h=366dc163bfc15e787fe067bf717aeab9f75d2e7c;hb=cc95b07215aac5f846c377abee3672879df99682;hp=746e101e496bcc4d42323d5d70bc3b0ef192c010;hpb=b233458bd1d5037ce4bbbb41fb513e1b68522a4d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/pod2html.PL b/pod/pod2html.PL index 746e101..366dc16 100644 --- a/pod/pod2html.PL +++ b/pod/pod2html.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 @@ -10,11 +11,13 @@ use File::Basename qw(&basename &dirname); # $startperl # 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"; @@ -177,4 +180,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;