From: Jarkko Hietaniemi Date: Wed, 6 Aug 2003 14:57:22 +0000 (+0000) Subject: More PASTHRU patching from Steve Hay. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11ae9ec4ebc72cfe4673e4d702a519d612ad0bb7;p=p5sagit%2Fp5-mst-13.2.git More PASTHRU patching from Steve Hay. p4raw-id: //depot/perl@20527 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index f49c707..7b54eac 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3112,18 +3112,19 @@ sub pasthru { $sep .= "\\\n\t"; foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE INC DEFINE)) { - if ($key eq 'INC' && defined(my $inc = $self->{INC})) { + next unless defined $self->{$key}; + if ($key eq 'INC') { # For INC we need to prepend parent directory but # only iff the parent directory is not absolute. my ($o, $i) = $Is_VMS ? ('/Include=', 'i') : ('-I', ''); - my $newinc = ''; - foreach (grep { /\S/ } parse_line(qr/\s*(?$i)$o/, 1, $inc)) { - s/^"(.+)"$/$1/o; + my $inc = ''; + foreach (grep { /\S/ } parse_line(qr/\s*(?$i)$o/, 1, $self->{INC})) { + s/^"(.+)"\s*$/$1/o; my $dir = File::Spec->file_name_is_absolute($_) ? $_ : File::Spec->catdir(File::Spec->updir, $_); $dir = qq["$dir"] if $dir =~ / /; - $newinc .= " $o$dir"; + $inc .= " $o$dir"; } - push @pasthru, "INC=\"$newinc\""; + push @pasthru, "INC=\"$inc\""; } else { push @pasthru, "$key=\"\$($key)\""; }