diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-07-16 21:51:11 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-07-24 10:30:17 +0200 |
commit | 080c37298617406e02876f5945650ccf10840f28 (patch) | |
tree | 200388466acde33fc3dd5a351b862dcb723e2ec3 /makedef.pl | |
parent | 5097d0e7442cf91c815bc77f427ba824e9e79876 (diff) | |
download | perl-080c37298617406e02876f5945650ccf10840f28.tar.gz |
Add an option TARG_DIR to makedef.pl, giving the path to files to read & write.
Change the Makefiles for Win32, WinCE and NetWare to pass in TARG_DIR of ..\
Previously ..\ was hardcoded for PLATFORM=win32, wince or netware. Making it a
parameter allows portable testing of makedef.pl.
Diffstat (limited to 'makedef.pl')
-rw-r--r-- | makedef.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/makedef.pl b/makedef.pl index 0f47ffb846..c69589d124 100644 --- a/makedef.pl +++ b/makedef.pl @@ -36,7 +36,9 @@ BEGIN { unshift @INC, "lib" } use Config; use strict; -use vars qw($PLATFORM $CCTYPE $FILETYPE $CONFIG_ARGS $ARCHNAME $PATCHLEVEL); +use vars qw($PLATFORM $CCTYPE $FILETYPE $CONFIG_ARGS $ARCHNAME $PATCHLEVEL $TARG_DIR); + +$TARG_DIR = ''; my (%define, %ordinal); @@ -56,6 +58,7 @@ while (@ARGV) { if ($PLATFORM eq 'netware') { $FILETYPE = $1 if ($flag =~ /^FILETYPE=(\w+)$/); } + $TARG_DIR = $1 if $flag =~ /^TARG_DIR=(.+)$/; } my @PLATFORM = qw(aix win32 wince os2 netware vms); @@ -112,9 +115,9 @@ if ($PLATFORM eq 'aix') { } elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') { $CCTYPE = "MSVC" unless defined $CCTYPE; - foreach ($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym + foreach ($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym, $config_sh) { - s!^!..\\!; + s!^!$TARG_DIR!; } } |