From: Jarkko Hietaniemi Date: Tue, 5 Aug 2003 17:58:01 +0000 (+0000) Subject: Try to fix the INC in PASTHRU. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5af649b6ecc517fa8d0eed56feda360d766a805d;p=p5sagit%2Fp5-mst-13.2.git Try to fix the INC in PASTHRU. p4raw-id: //depot/perl@20506 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index a59617d..f5a7ffd 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