X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fconfig_h.PL;h=a0ee22d3055277f4457d4835d618310492e385bb;hb=8bdaa535e831907095d85cca82627c485c5244c6;hp=17f3fc21630fedbd37bc2edf0cd4489c54d5da13;hpb=273cf8d1f309172b4416e78e4a8e80c12d941254;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/config_h.PL b/win32/config_h.PL index 17f3fc2..a0ee22d 100644 --- a/win32/config_h.PL +++ b/win32/config_h.PL @@ -11,6 +11,9 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) $opt{$1}=$2; shift(@ARGV); } + +$opt{CONFIG_H} ||= 'config.h'; + my $patchlevel = $opt{INST_VER}; $patchlevel =~ s|^[\\/]||; $patchlevel =~ s|~VERSION~|$Config{version}|g; @@ -24,6 +27,8 @@ while () } ($term,$file,$pat) = /^sed\s+<<(\S+)\s+>(\S+)\s+(.*)$/; +$file =~ s/^\$(\w+)$/$opt{$1}/g; + my $str = "sub munge\n{\n"; while ($pat =~ s/-e\s+'([^']*)'\s*//) @@ -40,7 +45,7 @@ eval $str; die "$str:$@" if $@; open(H,">$file.new") || die "Cannot open $file.new:$!"; -binmode H; # no CRs (which cause a spurious rebuild) +#binmode H; # no CRs (which cause a spurious rebuild) while () { last if /^$term$/o; @@ -49,12 +54,12 @@ while () munge(); s/\\\$/\$/g; s#/[ *\*]*\*/#/**/#; - if (/^\s*#define\s+(PRIVLIB|SITELIB)_EXP/) + if (/^\s*#define\s+(PRIVLIB|SITELIB|VENDORLIB)_EXP/) { $_ = "#define ". $1 . "_EXP (win32_get_". lc($1) . "($patchlevel))\t/**/\n"; } # incpush() handles archlibs, so disable them - elsif (/^\s*#define\s+(ARCHLIB|SITEARCH)_EXP/) + elsif (/^\s*#define\s+(ARCHLIB|SITEARCH|VENDORARCH)_EXP/) { $_ = "/*#define ". $1 . "_EXP \"\"\t/**/\n"; }