X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fc2ph.PL;h=38b259f0db187aa81fdbc574a31b177eed18ea8a;hb=ba979b3106a5e7f3b2512d1f4e93c681fba7aa9f;hp=9f80bc04a6778fae3d4a1063068ea3e638e24d04;hpb=44a8e56aa037ed0f03f0506f6f85f5ed290c78e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/c2ph.PL b/utils/c2ph.PL index 9f80bc0..38b259f 100644 --- a/utils/c2ph.PL +++ b/utils/c2ph.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 @@ -12,8 +13,10 @@ 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'; open OUT,">$file" or die "Can't create $file: $!"; @@ -1250,7 +1253,7 @@ main() { EOF for $type (@intrinsics) { - next if !type || $type eq 'void' || $type =~ /complex/; # sun stuff + next if !$type || $type eq 'void' || $type =~ /complex/; # sun stuff print <<"EOF"; printf(mask,sizeof($type), "$type"); EOF @@ -1397,3 +1400,4 @@ if (defined $Config{d_link}) { File::Copy::syscopy('c2ph', 'pstruct'); } exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; +chdir $origdir;