diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-07-27 23:21:14 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-08-01 11:53:56 +0200 |
commit | 9cc55be8e5f70c3e3b4c1bc6fc65924d9d9a8de4 (patch) | |
tree | 3b9f25ff5ed591faa524f92db9bb6d4643fa251b /makedef.pl | |
parent | 9661ac31cea34697b5b3481463c4f97203d2d572 (diff) | |
download | perl-9cc55be8e5f70c3e3b4c1bc6fc65924d9d9a8de4.tar.gz |
In makedef.pl, merge the code that reads config.sh
For now, retain compatibility (bug compatibility?) by not processing ccflags
and optimize on Win32, WinCE and NetWare.
Diffstat (limited to 'makedef.pl')
-rw-r--r-- | makedef.pl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/makedef.pl b/makedef.pl index f84c009cc9..e83eabcbeb 100644 --- a/makedef.pl +++ b/makedef.pl @@ -96,27 +96,23 @@ my $perlvars_h = "perlvars.h"; my $global_sym = "global.sym"; my $globvar_sym = "globvar.sym"; my $perlio_sym = "perlio.sym"; -my $static_ext = ""; s/^/$TARG_DIR/ foreach($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym, $config_sh); -unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'netware') { +{ open(CFG,$config_sh) || die "Cannot open $config_sh: $!\n"; while (<CFG>) { - if (/^(?:ccflags|optimize)='(.+)'$/) { + if (/^(?:ccflags|optimize)='(.+)'$/ + # Are the following strictly necessary? Added during refactoring + # to keep the same behaviour when merging other code into here. + && $PLATFORM ne 'win32' && $PLATFORM ne 'wince' + && $PLATFORM ne 'netware') { $_ = $1; $define{$1} = 1 while /-D(\w+)/g; } $define{$1} = $2 - if /^(config_args|archname|perl_patchlevel)='(.+)'$/; - } - close(CFG); -} -if ($PLATFORM eq 'win32' || $PLATFORM eq 'wince') { - open(CFG, '<', $config_sh) || die "Cannot open $config_sh: $!\n"; - if ((join '', <CFG>) =~ /^static_ext='(.*)'$/m) { - $static_ext = $1; + if /^(config_args|archname|perl_patchlevel|static_ext)='(.+)'$/; } close(CFG); } @@ -1266,6 +1262,7 @@ elsif ($PLATFORM eq 'netware') { # The VMS build scripts don't yet implement static extensions at all. if ($PLATFORM =~ /^win(?:32|ce)$/) { + my $static_ext = $define{static_ext} // ""; # records of type boot_module for statically linked modules (except Dynaloader) $static_ext =~ s/\//__/g; $static_ext =~ s/\bDynaLoader\b//; |