aboutsummaryrefslogtreecommitdiff
path: root/contrib/perl5/utils/h2ph.PL
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/utils/h2ph.PL')
-rw-r--r--contrib/perl5/utils/h2ph.PL12
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/perl5/utils/h2ph.PL b/contrib/perl5/utils/h2ph.PL
index 0b0208b0ca40..977fad6e9849 100644
--- a/contrib/perl5/utils/h2ph.PL
+++ b/contrib/perl5/utils/h2ph.PL
@@ -46,7 +46,7 @@ die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
my $Exit = 0;
-my $Dest_dir = $opt_d || $Config{installsitearch};
+my $Dest_dir = $opt_d || $Config{installarchlib};
die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
unless -d $Dest_dir;
@@ -528,7 +528,7 @@ sub inc_dirs
sub build_preamble_if_necessary
{
# Increment $VERSION every time this function is modified:
- my $VERSION = 2;
+ my $VERSION = 1;
my $preamble = "$Dest_dir/_h2ph_pre.ph";
# Can we skip building the preamble file?
@@ -556,9 +556,6 @@ 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 $_() { \"",
@@ -579,7 +576,8 @@ sub _extract_cc_defines
# Split compiler pre-definitions into `key=value' pairs:
foreach (split /\s+/, $allsymbols) {
- /(.+?)=(.+)/ and $define{$1} = $2;
+ /(.*?)=(.*)/;
+ $define{$1} = $2;
if ($opt_D) {
print STDERR "$_: $1 -> $2\n";
@@ -629,7 +627,7 @@ If run with no arguments, filters standard input to standard output.
=item -d destination_dir
Put the resulting B<.ph> files beneath B<destination_dir>, instead of
-beneath the default Perl library location (C<$Config{'installsitsearch'}>).
+beneath the default Perl library location (C<$Config{'installarchlib'}>).
=item -r