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
# 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';
# problem currently exists.
#
# Version 1.00 Original.
-# Version 1.01 Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Version 1.01 Andy Dougherty <doughera@lafayette.edu>
# Trivial modifications to output format for easier auto-parsing
# Broke it out as a separate function to avoid nasty
# Make/Shell/Perl quoting problems, and also to make it easier
$exit = $last_unempty = 0;
while (<>) {
- chomp;
+ s/(\012|\015\012|\015)$//;
if (/^=(\S+)/ && $directive{$1} && $last_unempty) {
- printf "%s: line %5d, no blank line preceeding directive =%s\n",
+ printf "%s: line %5d, no blank line preceding directive =%s\n",
$ARGV, $., $1;
$exit = 1;
}
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;