diff options
author | Kurt D. Starsinic <kstar@wolfetech.com> | 1999-04-23 08:37:23 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-04-23 18:42:44 +0000 |
commit | 00f0ad8cc5167da0ecee5f9c3558c45074323a13 (patch) | |
tree | 38e1a4e171e2f81697435c279412afc72c51405d /utils/h2ph.PL | |
parent | caa4726ac5a7d34afcdb24b703e97550fa16fff0 (diff) | |
download | perl-00f0ad8cc5167da0ecee5f9c3558c45074323a13.tar.gz |
h2ph
To: perl5-porters@perl.org, Jarkko Hietaniemi <jhi@iki.fi>,
Graham Barr <gbarr@pobox.com>, Gurusamy Sarathy <gsar@activestate.com>
Cc: Lionel Cons <lionel.cons@cern.ch>,
Ilya Zakharevich <ilya@math.ohio-state.edu>,
David Hayes <david@bdel.com>
Message-ID: <19990423123723.A49550@O2.chapin.edu>
p4raw-id: //depot/cfgperl@3266
Diffstat (limited to 'utils/h2ph.PL')
-rw-r--r-- | utils/h2ph.PL | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL index 6011d98f1f..0b0208b0ca 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -528,7 +528,7 @@ sub inc_dirs sub build_preamble_if_necessary { # Increment $VERSION every time this function is modified: - my $VERSION = 1; + my $VERSION = 2; my $preamble = "$Dest_dir/_h2ph_pre.ph"; # Can we skip building the preamble file? @@ -556,6 +556,9 @@ sub build_preamble_if_necessary if ($define{$_} =~ /^\d+$/) { print PREAMBLE "unless (defined &$_) { sub $_() { $define{$_} } }\n\n"; + } elsif ($define{$_} =~ /^\w+$/) { + print PREAMBLE + "unless (defined &$_) { sub $_() { &$define{$_} } }\n\n"; } else { print PREAMBLE "unless (defined &$_) { sub $_() { \"", @@ -576,8 +579,7 @@ sub _extract_cc_defines # Split compiler pre-definitions into `key=value' pairs: foreach (split /\s+/, $allsymbols) { - /(.*?)=(.*)/; - $define{$1} = $2; + /(.+?)=(.+)/ and $define{$1} = $2; if ($opt_D) { print STDERR "$_: $1 -> $2\n"; |