summaryrefslogtreecommitdiff
path: root/lib/ExtUtils
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-06 14:57:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-06 14:57:22 +0000
commit11ae9ec4ebc72cfe4673e4d702a519d612ad0bb7 (patch)
tree93c9ba996dd53fb694dc2752ba5aa556d77394b6 /lib/ExtUtils
parent08ef4a904f12d715b5130322e97716e61ee78459 (diff)
downloadperl-11ae9ec4ebc72cfe4673e4d702a519d612ad0bb7.tar.gz
More PASTHRU patching from Steve Hay.
p4raw-id: //depot/perl@20527
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r--lib/ExtUtils/MM_Unix.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index f49c7071d4..7b54eac5dc 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)\"";
}