X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fconfig_sh.PL;h=fc0daf05bc0f51184780b07c27f81cb0f0d11278;hb=9cc6feabb930fb7cac992ab0a2febf2fb1986667;hp=0c3713cb2ee2d93819acf5e4b7c93ddc130a701d;hpb=e5a95ffba7bb8798f8211d43c45c423a80fd0fa5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 0c3713c..fc0daf0 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_]+)=(.*)$/) { @@ -5,14 +17,20 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) shift(@ARGV); } +$opt{VERSION} = $]; +$opt{INST_VER} =~ s|~VERSION~|$]|g; if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true - $opt{PATCHLEVEL} = int($1 || 0); - $opt{SUBVERSION} = $2 || '00'; + $opt{PERL_VERSION} = int($1 || 0); + $opt{PERL_SUBVERSION} = $2 || '00'; } $opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'}; $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 (<>) {