diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-01 06:27:35 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-01 06:27:35 +0000 |
commit | 80252599d4b7fb26eec4e3a0f451b4387c5dcc19 (patch) | |
tree | af33a52bae818e292c641108bbbc11b8b1b4f8c2 /win32/config_sh.PL | |
parent | 34f744a4168d1ae5fad32a9241fb076a6b2c3fa8 (diff) | |
download | perl-80252599d4b7fb26eec4e3a0f451b4387c5dcc19.tar.gz |
various win32-ish changes merged from maint-5.005
p4raw-id: //depot/perl@2746
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r-- | win32/config_sh.PL | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 59e64f9675..1d4b2fb5c3 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -1,3 +1,15 @@ +# take a semicolon separated path list and turn it into a quoted +# list of paths that Text::Parsewords will grok +sub mungepath { + my $p = shift; + # remove leading/trailing semis/spaces + $p =~ s/^[ ;]+//; + $p =~ s/[ ;]+$//; + $p =~ s/'/"/g; + my @p = map { $_ = "\"$_\"" if /\s/ and !/^".*"$/; $_ } split /;/, $p; + return join(' ', @p); +} + my %opt; while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) { @@ -17,6 +29,9 @@ $opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0] unless $opt{'cf_email'}; $opt{'usemymalloc'} = 'y' if $opt{'d_mymalloc'} eq 'define'; +$opt{libpth} = mungepath($opt{libpth}) if exists $opt{libpth}; +$opt{incpath} = mungepath($opt{incpath}) if exists $opt{incpath}; + while (<>) { s/~([\w_]+)~/$opt{$1}/g; |