diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-05 17:58:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-05 17:58:01 +0000 |
commit | 5af649b6ecc517fa8d0eed56feda360d766a805d (patch) | |
tree | f5d924605844c01019f0178c99cccf550d136417 /lib/ExtUtils | |
parent | b1d8b47a028db8ab1908f3473c1e817e8d84b55d (diff) | |
download | perl-5af649b6ecc517fa8d0eed56feda360d766a805d.tar.gz |
Try to fix the INC in PASTHRU.
p4raw-id: //depot/perl@20506
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index a59617dc46..f5a7ffd8ef 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3111,7 +3111,16 @@ sub pasthru { $sep .= "\\\n\t"; foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE INC DEFINE)) { - push @pasthru, "$key=\"\$($key)\""; + if ($key eq 'INC') { + # For INC we need to prepend parent directory but + # only iff the parent directory is not absolute. + my $inc = $self->{INC}; + my ($o, $i) = $Is_VMS ? ('/Include=', 'i') : ('-I', ''); + $inc =~ s!(?$i)$o(.+?)!$o.($self->file_name_is_absolute($1)?$1:$self->catdir($self->updir,$1))!eg; + push @pasthru, "INC=\"$inc\""; + } else { + push @pasthru, "$key=\"\$($key)\""; + } } # PASTHRU_DEFINE and PASTHRU_INC are defined explicitly |