summaryrefslogtreecommitdiff
path: root/win32/config_h.PL
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-01 07:43:02 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-01 07:43:02 +0000
commite5a95ffba7bb8798f8211d43c45c423a80fd0fa5 (patch)
tree11fb48d1a485b304f3e8a91183a00e39ffe10d36 /win32/config_h.PL
parent9b89d93d5855d0edff8da7afe2143583c17c017d (diff)
downloadperl-e5a95ffba7bb8798f8211d43c45c423a80fd0fa5.tar.gz
[win32] @INC construction on win32 cleaned up
- perl.dll location based paths should be much more reliable now - registry stuff unchanged - Config.pm now has all the installfoolib entries for MakeMaker et al p4raw-id: //depot/win32/perl@1069
Diffstat (limited to 'win32/config_h.PL')
-rw-r--r--win32/config_h.PL31
1 files changed, 17 insertions, 14 deletions
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 0a4e6cee51..26a2430fb0 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -5,6 +5,17 @@ use File::Copy qw(copy);
my $OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i;
my $name = $0;
$name =~ s#^(.*)\.PL$#../$1.SH#;
+my %opt;
+while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
+ {
+ $opt{$1}=$2;
+ shift(@ARGV);
+ }
+my $patchlevel = $opt{INST_VER};
+$patchlevel = s|^[\\/]||;
+$patchlevel ||= $];
+$patchlevel = qq["$patchlevel"];
+
open(SH,"<$name") || die "Cannot open $name:$!";
while (<SH>)
{
@@ -37,26 +48,18 @@ while (<SH>)
munge();
s/\\\$/\$/g;
s#/[ *\*]*\*/#/**/#;
- # if (/^\s*#define\s+ARCHLIB_EXP/)
- # {
- # $_ = "#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL))\t/**/\n";
- # }
- if (/^\s*#define\s+PRIVLIB_EXP/)
+ if (/^\s*#define\s+(PRIVLIB|SITELIB)_EXP/)
{
- $_ = "#define PRIVLIB_EXP (win32_get_stdlib(patchlevel))\t/**/\n"
+ $_ = "#define ". $1 . "_EXP (win32_get_". lc($1) . "($patchlevel))\t/**/\n";
}
- # if (/^\s*#define\s+SITEARCH_EXP/)
- # {
- # $_ = "#define SITEARCH_EXP (win32_perllib_path(\"site\",ARCHNAME,NULL))\t/**/\n";
- # }
- if (/^\s*#define\s+SITELIB_EXP/)
+ # incpush() handles archlibs, so disable them
+ elsif (/^\s*#define\s+(ARCHLIB|SITEARCH)_EXP/)
{
- $_ = "#define SITELIB_EXP (win32_get_sitelib(patchlevel))\t/**/\n";
+ $_ = "/*#define ". $1 . "_EXP \"\"\t/**/\n";
}
print H;
}
-print H "#include <win32.h>
-";
+print H "#include <win32.h>\n";
close(H);
close(SH);