# Set these to wherever you want "nmake install" to put your
# newly built perl.
INST_DRV = c:
-INST_TOP = $(INST_DRV)\perl\5004.5x
+INST_TOP = $(INST_DRV)\perl
+
+# Comment this out if you DON'T want your perl installation to be versioned.
+# This means that the new installation will overwrite any files from the
+# old installation at the same INST_TOP location. Leaving it enabled is
+# the safest route, as perl adds the extra version directory to all the
+# locations it installs files to. If you disable it, an alternative
+# versioned installation can be obtained by setting INST_TOP above to a
+# path that includes an arbitrary version string.
+INST_VER = \5.00466
#
# uncomment to enable threads-capabilities
#
# set the install locations of the compiler include/libraries
-# (you'll need to quote the value if it contains spaces: i.e.
-# CCHOME = "f:\Program Files\vc"
#
#CCHOME = f:\msvc20
CCHOME = $(MSVCDIR)
-out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
#
-INST_BIN = $(INST_TOP)\bin
-INST_LIB = $(INST_TOP)\lib
+INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
+INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
+INST_LIB = $(INST_TOP)$(INST_VER)\lib
INST_POD = $(INST_LIB)\pod
INST_HTML = $(INST_POD)\html
LIBDIR = ..\lib
CFG_VARS = \
"INST_DRV=$(INST_DRV)" \
"INST_TOP=$(INST_TOP)" \
+ "INST_VER=$(INST_VER)" \
"archname=$(ARCHNAME)" \
"cc=$(CC)" \
"ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
cd win32
-del /f $(CFGH_TMPL)
-mkdir ..\lib\CORE
- -perl -I..\lib config_h.PL
+ -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
rename config.h $(CFGH_TMPL)
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
- $(MINIPERL) -I..\lib config_h.PL || $(MAKE) $(MAKEFLAGS) $(CONFIGPM)
+ $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
+ || $(MAKE) $(MAKEFLAGS) $(CONFIGPM)
$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
$(LINK32) -subsystem:console -out:$@ @<<
installutils : utils
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
- $(XCOPY) bin\*.bat $(INST_BIN)\*.*
- $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
+ $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
+ $(XCOPY) ..\pod\*.bat $(INST_SCRIPT)\*.*
installhtml : doc
$(RCOPY) html\*.* $(INST_HTML)\*.*
alignbytes='8'
aphostname=''
ar='tlib /P128'
-archlib=''
-archlibexp=''
+archlib='~INST_TOP~~INST_VER~\lib\~archname~'
+archlibexp='~INST_TOP~~INST_VER~\lib\~archname~'
archname='MSWin32'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
-bin='~INST_TOP~\bin'
-binexp='~INST_TOP~\bin'
+bin='~INST_TOP~~INST_VER~\bin\~archname~'
+binexp='~INST_TOP~~INST_VER~\bin\~archname~'
bison=''
byacc='byacc'
byteorder='1234'
d_Gconvert='gcvt((x),(n),(b))'
d_access='define'
d_alarm='undef'
-d_archlib='undef'
+d_archlib='define'
d_attribut='undef'
d_bcmp='undef'
d_bcopy='undef'
i_vfork='undef'
incpath=''
inews=''
-installarchlib='~INST_TOP~\lib\~archname~'
-installbin='~INST_TOP~\bin\~archname~'
-installman1dir='~INST_TOP~\man\man1'
-installman3dir='~INST_TOP~\man\man3'
-installprivlib='~INST_TOP~\lib'
-installscript='~INST_TOP~\bin'
-installsitearch='~INST_TOP~\..\site\~VERSION~\lib\~archname~'
-installsitelib='~INST_TOP~\..\site\~VERSION~\lib'
+installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
+installbin='~INST_TOP~~INST_VER~\bin\~archname~'
+installman1dir='~INST_TOP~~INST_VER~\man\man1'
+installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installprivlib='~INST_TOP~~INST_VER~\lib'
+installscript='~INST_TOP~~INST_VER~\bin'
+installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+installsitelib='~INST_TOP~\site~INST_VER~\lib'
intsize='4'
known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread'
ksh=''
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
-man1dir='~INST_TOP~\man\man1'
-man1direxp='~INST_TOP~\man\man1'
+man1dir='~INST_TOP~~INST_VER~\man\man1'
+man1direxp='~INST_TOP~~INST_VER~\man\man1'
man1ext='1'
-man3dir='~INST_TOP~\man\man3'
-man3direxp='~INST_TOP~\man\man3'
+man3dir='~INST_TOP~~INST_VER~\man\man3'
+man3direxp='~INST_TOP~~INST_VER~\man\man3'
man3ext='3'
medium=''
mips=''
path_sep=';'
perl='perl'
perladmin=''
-perlpath='~INST_TOP~\bin\~archname~\perl.exe'
+perlpath='~INST_TOP~~INST_VER~\bin\~archname~\perl.exe'
pg=''
phostname='hostname'
pidtype='int'
pr=''
prefix='~INST_DRV~'
prefixexp='~INST_DRV~'
-privlib='~INST_TOP~\lib'
-privlibexp='~INST_TOP~\lib'
+privlib='~INST_TOP~~INST_VER~\lib'
+privlibexp='~INST_TOP~~INST_VER~\lib'
prototype='define'
ptrsize='4'
randbits='15'
rm='del'
rmail=''
runnm='true'
-scriptdir='~INST_TOP~\bin'
-scriptdirexp='~INST_TOP~\bin'
+scriptdir='~INST_TOP~~INST_VER~\bin'
+scriptdirexp='~INST_TOP~~INST_VER~\bin'
sed='sed'
selecttype='Perl_fd_set *'
sendmail='blat'
sig_name_init='"ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "USR3", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0'
sig_num='0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 18, 0'
signal_t='void'
-sitearch=''
-sitearchexp=''
-sitelib='~INST_TOP~\..\site\~VERSION~\lib'
-sitelibexp='~INST_TOP~\..\site\~VERSION~\lib'
+sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitearchexp='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitelib='~INST_TOP~\site~INST_VER~\lib'
+sitelibexp='~INST_TOP~\site~INST_VER~\lib'
sizetype='size_t'
sleep=''
smail=''
alignbytes='8'
aphostname=''
ar='ar'
-archlib=''
-archlibexp=''
+archlib='~INST_TOP~~INST_VER~\lib\~archname~'
+archlibexp='~INST_TOP~~INST_VER~\lib\~archname~'
archname='MSWin32'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
-bin='~INST_TOP~\bin'
-binexp='~INST_TOP~\bin'
+bin='~INST_TOP~~INST_VER~\bin\~archname~'
+binexp='~INST_TOP~~INST_VER~\bin\~archname~'
bison=''
byacc='byacc'
byteorder='1234'
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
d_access='define'
d_alarm='undef'
-d_archlib='undef'
+d_archlib='define'
d_attribut='define'
d_bcmp='undef'
d_bcopy='undef'
i_vfork='undef'
incpath=''
inews=''
-installarchlib='~INST_TOP~\lib\~archname~'
-installbin='~INST_TOP~\bin\~archname~'
-installman1dir='~INST_TOP~\man\man1'
-installman3dir='~INST_TOP~\man\man3'
-installprivlib='~INST_TOP~\lib'
-installscript='~INST_TOP~\bin'
-installsitearch='~INST_TOP~\..\site\~VERSION~\lib\~archname~'
-installsitelib='~INST_TOP~\..\site\~VERSION~\lib'
+installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
+installbin='~INST_TOP~~INST_VER~\bin\~archname~'
+installman1dir='~INST_TOP~~INST_VER~\man\man1'
+installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installprivlib='~INST_TOP~~INST_VER~\lib'
+installscript='~INST_TOP~~INST_VER~\bin'
+installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+installsitelib='~INST_TOP~\site~INST_VER~\lib'
intsize='4'
known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread'
ksh=''
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
-man1dir='~INST_TOP~\man\man1'
-man1direxp='~INST_TOP~\man\man1'
+man1dir='~INST_TOP~~INST_VER~\man\man1'
+man1direxp='~INST_TOP~~INST_VER~\man\man1'
man1ext='1'
-man3dir='~INST_TOP~\man\man3'
-man3direxp='~INST_TOP~\man\man3'
+man3dir='~INST_TOP~~INST_VER~\man\man3'
+man3direxp='~INST_TOP~~INST_VER~\man\man3'
man3ext='3'
medium=''
mips=''
path_sep=';'
perl='perl'
perladmin=''
-perlpath='~INST_TOP~\bin\~archname~\perl.exe'
+perlpath='~INST_TOP~~INST_VER~\bin\~archname~\perl.exe'
pg=''
phostname='hostname'
pidtype='int'
pr=''
prefix='~INST_DRV~'
prefixexp='~INST_DRV~'
-privlib='~INST_TOP~\lib'
-privlibexp='~INST_TOP~\lib'
+privlib='~INST_TOP~~INST_VER~\lib'
+privlibexp='~INST_TOP~~INST_VER~\lib'
prototype='define'
ptrsize='4'
randbits='15'
rm='del'
rmail=''
runnm='true'
-scriptdir='~INST_TOP~\bin'
-scriptdirexp='~INST_TOP~\bin'
+scriptdir='~INST_TOP~~INST_VER~\bin'
+scriptdirexp='~INST_TOP~~INST_VER~\bin'
sed='sed'
selecttype='Perl_fd_set *'
sendmail='blat'
sig_name_init='"ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0'
sig_num='0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0'
signal_t='void'
-sitearch=''
-sitearchexp=''
-sitelib='~INST_TOP~\..\site\~VERSION~\lib'
-sitelibexp='~INST_TOP~\..\site\~VERSION~\lib'
+sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitearchexp='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitelib='~INST_TOP~\site~INST_VER~\lib'
+sitelibexp='~INST_TOP~\site~INST_VER~\lib'
sizetype='size_t'
sleep=''
smail=''
alignbytes='8'
aphostname=''
ar='lib'
-archlib=''
-archlibexp=''
+archlib='~INST_TOP~~INST_VER~\lib\~archname~'
+archlibexp='~INST_TOP~~INST_VER~\lib\~archname~'
archname='MSWin32'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
-bin='~INST_TOP~\bin'
-binexp='~INST_TOP~\bin'
+bin='~INST_TOP~~INST_VER~\bin\~archname~'
+binexp='~INST_TOP~~INST_VER~\bin\~archname~'
bison=''
byacc='byacc'
byteorder='1234'
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
d_access='define'
d_alarm='undef'
-d_archlib='undef'
+d_archlib='define'
d_attribut='undef'
d_bcmp='undef'
d_bcopy='undef'
i_vfork='undef'
incpath=''
inews=''
-installarchlib='~INST_TOP~\lib\~archname~'
-installbin='~INST_TOP~\bin\~archname~'
-installman1dir='~INST_TOP~\man\man1'
-installman3dir='~INST_TOP~\man\man3'
-installprivlib='~INST_TOP~\lib'
-installscript='~INST_TOP~\bin'
-installsitearch='~INST_TOP~\..\site\~VERSION~\lib\~archname~'
-installsitelib='~INST_TOP~\..\site\~VERSION~\lib'
+installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
+installbin='~INST_TOP~~INST_VER~\bin\~archname~'
+installman1dir='~INST_TOP~~INST_VER~\man\man1'
+installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installprivlib='~INST_TOP~~INST_VER~\lib'
+installscript='~INST_TOP~~INST_VER~\bin'
+installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+installsitelib='~INST_TOP~\site~INST_VER~\lib'
intsize='4'
known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread'
ksh=''
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
-man1dir='~INST_TOP~\man\man1'
-man1direxp='~INST_TOP~\man\man1'
+man1dir='~INST_TOP~~INST_VER~\man\man1'
+man1direxp='~INST_TOP~~INST_VER~\man\man1'
man1ext='1'
-man3dir='~INST_TOP~\man\man3'
-man3direxp='~INST_TOP~\man\man3'
+man3dir='~INST_TOP~~INST_VER~\man\man3'
+man3direxp='~INST_TOP~~INST_VER~\man\man3'
man3ext='3'
medium=''
mips=''
path_sep=';'
perl='perl'
perladmin=''
-perlpath='~INST_TOP~\bin\~archname~\perl.exe'
+perlpath='~INST_TOP~~INST_VER~\bin\~archname~\perl.exe'
pg=''
phostname='hostname'
pidtype='int'
pr=''
prefix='~INST_DRV~'
prefixexp='~INST_DRV~'
-privlib='~INST_TOP~\lib'
-privlibexp='~INST_TOP~\lib'
+privlib='~INST_TOP~~INST_VER~\lib'
+privlibexp='~INST_TOP~~INST_VER~\lib'
prototype='define'
ptrsize='4'
randbits='15'
rm='del'
rmail=''
runnm='true'
-scriptdir='~INST_TOP~\bin'
-scriptdirexp='~INST_TOP~\bin'
+scriptdir='~INST_TOP~~INST_VER~\bin'
+scriptdirexp='~INST_TOP~~INST_VER~\bin'
sed='sed'
selecttype='Perl_fd_set *'
sendmail='blat'
sig_name_init='"ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0'
sig_num='0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0'
signal_t='void'
-sitearch=''
-sitearchexp=''
-sitelib='~INST_TOP~\..\site\~VERSION~\lib'
-sitelibexp='~INST_TOP~\..\site\~VERSION~\lib'
+sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitearchexp='~INST_TOP~\site~INST_VER~\lib\~archname~'
+sitelib='~INST_TOP~\site~INST_VER~\lib'
+sitelibexp='~INST_TOP~\site~INST_VER~\lib'
sizetype='size_t'
sleep=''
smail=''
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5004.5x\\bin" /**/
-#define BIN_EXP "c:\\perl\\5004.5x\\bin" /**/
+#define BIN "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-/*#define ARCHLIB "" /**/
-/*#define ARCHLIB_EXP "" /**/
+#define ARCHLIB "c:\\perl\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define ARCHLIB_EXP "" /**/
/* CAT2:
* This macro catenates 2 tokens together.
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\5004.5x\\lib" /**/
-#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/
+#define PRIVLIB "c:\\perl\\5.00466\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00466")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "" /**/
-#define SITEARCH_EXP "" /**/
+#define SITEARCH "c:\\perl\\site\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define SITEARCH_EXP "" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\5004.5x\\..\\site\\5.00466\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(patchlevel)) /**/
+#define SITELIB "c:\\perl\\site\\5.00466\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00466")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5004.5x\\bin" /**/
-#define BIN_EXP "c:\\perl\\5004.5x\\bin" /**/
+#define BIN "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-/*#define ARCHLIB "" /**/
-/*#define ARCHLIB_EXP "" /**/
+#define ARCHLIB "c:\\perl\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define ARCHLIB_EXP "" /**/
/* CAT2:
* This macro catenates 2 tokens together.
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\5004.5x\\lib" /**/
-#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/
+#define PRIVLIB "c:\\perl\\5.00466\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00466")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "" /**/
-#define SITEARCH_EXP "" /**/
+#define SITEARCH "c:\\perl\\site\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define SITEARCH_EXP "" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\5004.5x\\..\\site\\5.00466\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(patchlevel)) /**/
+#define SITELIB "c:\\perl\\site\\5.00466\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00466")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5004.5x\\bin" /**/
-#define BIN_EXP "c:\\perl\\5004.5x\\bin" /**/
+#define BIN "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00466\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-/*#define ARCHLIB "" /**/
-/*#define ARCHLIB_EXP "" /**/
+#define ARCHLIB "c:\\perl\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define ARCHLIB_EXP "" /**/
/* CAT2:
* This macro catenates 2 tokens together.
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\5004.5x\\lib" /**/
-#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/
+#define PRIVLIB "c:\\perl\\5.00466\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00466")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "" /**/
-#define SITEARCH_EXP "" /**/
+#define SITEARCH "c:\\perl\\site\\5.00466\\lib\\MSWin32-x86" /**/
+/*#define SITEARCH_EXP "" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\5004.5x\\..\\site\\5.00466\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(patchlevel)) /**/
+#define SITELIB "c:\\perl\\site\\5.00466\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00466")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
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>)
{
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);
$opt{SUBVERSION} = $2 || '00';
}
-$opt{VERSION} = $];
$opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
$opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0]
unless $opt{'cf_email'};
# Set these to wherever you want "nmake install" to put your
# newly built perl.
INST_DRV *= c:
-INST_TOP *= $(INST_DRV)\perl\5004.5x
+INST_TOP *= $(INST_DRV)\perl
+
+# Comment this out if you DON'T want your perl installation to be versioned.
+# This means that the new installation will overwrite any files from the
+# old installation at the same INST_TOP location. Leaving it enabled is
+# the safest route, as perl adds the extra version directory to all the
+# locations it installs files to. If you disable it, an alternative
+# versioned installation can be obtained by setting INST_TOP above to a
+# path that includes an arbitrary version string.
+INST_VER *= \5.00466
#
# uncomment to enable threads-capabilities
#
# set the install locations of the compiler include/libraries
-# (you'll need to quote the value if it contains spaces: i.e.
-# CCHOME *= "f:\Program Files\vc"
#
#CCHOME *= f:\msdev\vc
CCHOME *= C:\bc5
.ENDIF
#
-INST_BIN = $(INST_TOP)\bin
-INST_LIB = $(INST_TOP)\lib
+INST_BIN = $(INST_TOP)$(INST_VER)\bin\$(ARCHNAME)
+INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
+INST_LIB = $(INST_TOP)$(INST_VER)\lib
INST_POD = $(INST_LIB)\pod
INST_HTML = $(INST_POD)\html
LIBDIR = ..\lib
CFG_VARS = \
"INST_DRV=$(INST_DRV)" \
"INST_TOP=$(INST_TOP)" \
+ "INST_VER=$(INST_VER)" \
"archname=$(ARCHNAME)" \
"cc=$(CC)" \
"ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
cd .. && perl configpm
-del /f $(CFGH_TMPL)
-mkdir ..\lib\CORE
- -perl -I..\lib config_h.PL
+ -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
rename config.h $(CFGH_TMPL)
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
- $(MINIPERL) -I..\lib config_h.PL || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
+ $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
+ || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
.IF "$(CCTYPE)" == "BORLAND"
installutils : utils
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
- $(XCOPY) bin\*.bat $(INST_BIN)\*.*
- $(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
+ $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
+ $(XCOPY) ..\pod\*.bat $(INST_SCRIPT)\*.*
installhtml : doc
$(RCOPY) html\*.* $(INST_HTML)\*.*
};
-extern char * g_win32_get_stdlib(char *pl);
+extern char * g_win32_get_privlib(char *pl);
extern char * g_win32_get_sitelib(char *pl);
class CPerlEnv : public IPerlEnv
{
};
virtual char* LibPath(char *pl)
{
- return g_win32_get_stdlib(pl);
+ return g_win32_get_privlib(pl);
};
virtual char* SiteLibPath(char *pl)
{
#define EXECF_SPAWN_NOWAIT 3
#if defined(PERL_OBJECT)
-#undef win32_get_stdlib
-#define win32_get_stdlib g_win32_get_stdlib
+#undef win32_get_privlib
+#define win32_get_privlib g_win32_get_privlib
#undef win32_get_sitelib
#define win32_get_sitelib g_win32_get_sitelib
#undef do_aspawn
static BOOL has_redirection(char *ptr);
static long filetime_to_clock(PFILETIME ft);
static BOOL filetime_from_time(PFILETIME ft, time_t t);
-
+static char * get_emd_part(char *leading, char *trailing, ...);
HANDLE w32_perldll_handle = INVALID_HANDLE_VALUE;
static DWORD w32_platform = (DWORD)-1;
}
retval = RegQueryValueEx(handle, lpszValueName, 0, NULL, (PBYTE)*ptr, lpDataLen);
if (retval != ERROR_SUCCESS) {
- Safefree(ptr);
- ptr = NULL;
+ Safefree(*ptr);
+ *ptr = NULL;
}
}
RegCloseKey(handle);
return *ptr;
}
-char *
-win32_get_stdlib(char *pl)
-{
- static char szStdLib[] = "lib";
- int len = 0, newSize;
- char szBuffer[MAX_PATH+1];
- char szModuleName[MAX_PATH];
- int result;
- DWORD dwDataLen;
- char *lpPath = NULL;
+static char *
+get_emd_part(char *prev_path, char *trailing_path, ...)
+{
+ va_list ap;
+ char mod_name[MAX_PATH];
char *ptr;
-
- /* $stdlib = $HKCU{"lib-$]"} || $HKLM{"lib-$]"} || $HKCU{"lib"} || $HKLM{"lib"} || ""; */
- sprintf(szBuffer, "%s-%s", szStdLib, pl);
- lpPath = GetRegStr(szBuffer, &lpPath, &dwDataLen);
- if (lpPath == NULL)
- lpPath = GetRegStr(szStdLib, &lpPath, &dwDataLen);
-
- /* $stdlib .= ";$EMD/../../lib" */
- GetModuleFileName(GetModuleHandle(NULL), szModuleName, sizeof(szModuleName));
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- {
+ char *optr;
+ char *strip;
+ int oldsize, newsize;
+
+ va_start(ap, trailing_path);
+ strip = va_arg(ap, char *);
+
+ GetModuleFileName(GetModuleHandle(NULL), mod_name, sizeof(mod_name));
+ ptr = strrchr(mod_name, '\\');
+ while (ptr && strip) {
+ /* look for directories to skip back */
+ optr = ptr;
*ptr = '\0';
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- {
- *ptr = '\0';
- ptr = strrchr(szModuleName, '\\');
+ ptr = strrchr(mod_name, '\\');
+ if (!ptr || stricmp(ptr+1, strip) != 0) {
+ *optr = '\\';
+ ptr = optr;
}
+ strip = va_arg(ap, char *);
}
- if (ptr == NULL)
- {
- ptr = szModuleName;
+ if (!ptr) {
+ ptr = mod_name;
+ *ptr++ = '.';
*ptr = '\\';
}
- strcpy(++ptr, szStdLib);
+ va_end(ap);
+ strcpy(++ptr, trailing_path);
- /* check that this path exists */
- GetCurrentDirectory(sizeof(szBuffer), szBuffer);
- result = SetCurrentDirectory(szModuleName);
- SetCurrentDirectory(szBuffer);
- if (result == 0)
- {
- GetModuleFileName(GetModuleHandle(NULL), szModuleName, sizeof(szModuleName));
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- strcpy(++ptr, szStdLib);
+ newsize = strlen(mod_name) + 1;
+ if (prev_path) {
+ oldsize = strlen(prev_path) + 1;
+ newsize += oldsize; /* includes plus 1 for ';' */
+ Renew(prev_path, newsize, char);
+ prev_path[oldsize] = ';';
+ strcpy(&prev_path[oldsize], mod_name);
}
-
- newSize = strlen(szModuleName) + 1;
- if (lpPath != NULL)
- {
- len = strlen(lpPath);
- newSize += len + 1; /* plus 1 for ';' */
- lpPath = Renew(lpPath, newSize, char);
+ else {
+ New(1311, prev_path, newsize, char);
+ strcpy(prev_path, mod_name);
}
- else
- New(1310, lpPath, newSize, char);
- if (lpPath != NULL)
- {
- if (len != 0)
- lpPath[len++] = ';';
- strcpy(&lpPath[len], szModuleName);
- }
- return lpPath;
+ return prev_path;
}
char *
-get_sitelib_part(char* lpRegStr, char* lpPathStr)
-{
- char szBuffer[MAX_PATH+1];
- char szModuleName[MAX_PATH];
- DWORD dwDataLen;
- int len = 0;
- int result;
- char *lpPath = NULL;
- char *ptr;
-
- lpPath = GetRegStr(lpRegStr, &lpPath, &dwDataLen);
-
- /* $sitelib .= ";$EMD/../../../<lpPathStr>" */
- GetModuleFileName(GetModuleHandle(NULL), szModuleName, sizeof(szModuleName));
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- {
- *ptr = '\0';
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- {
- *ptr = '\0';
- ptr = strrchr(szModuleName, '\\');
- if (ptr != NULL)
- {
- *ptr = '\0';
- ptr = strrchr(szModuleName, '\\');
- }
- }
- }
- if (ptr == NULL)
- {
- ptr = szModuleName;
- *ptr = '\\';
- }
- strcpy(++ptr, lpPathStr);
-
- /* check that this path exists */
- GetCurrentDirectory(sizeof(szBuffer), szBuffer);
- result = SetCurrentDirectory(szModuleName);
- SetCurrentDirectory(szBuffer);
+win32_get_privlib(char *pl)
+{
+ char *stdlib = "lib";
+ char buffer[MAX_PATH+1];
+ char *path = Nullch;
+ DWORD datalen;
- if (result)
- {
- int newSize = strlen(szModuleName) + 1;
- if (lpPath != NULL)
- {
- len = strlen(lpPath);
- newSize += len + 1; /* plus 1 for ';' */
- lpPath = Renew(lpPath, newSize, char);
- }
- else
- New(1311, lpPath, newSize, char);
+ /* $stdlib = $HKCU{"lib-$]"} || $HKLM{"lib-$]"} || $HKCU{"lib"} || $HKLM{"lib"} || ""; */
+ sprintf(buffer, "%s-%s", stdlib, pl);
+ path = GetRegStr(buffer, &path, &datalen);
+ if (path == NULL)
+ path = GetRegStr(stdlib, &path, &datalen);
- if (lpPath != NULL)
- {
- if (len != 0)
- lpPath[len++] = ';';
- strcpy(&lpPath[len], szModuleName);
- }
- }
- return lpPath;
+ /* $stdlib .= ";$EMD/../../lib" */
+ return get_emd_part(path, stdlib, ARCHNAME, "bin", Nullch);
}
char *
win32_get_sitelib(char *pl)
{
- static char szSiteLib[] = "sitelib";
- char szRegStr[40];
- char szPathStr[MAX_PATH];
- char *lpPath1;
- char *lpPath2;
- int len, newSize;
+ char *sitelib = "sitelib";
+ char regstr[40];
+ char pathstr[MAX_PATH];
+ DWORD datalen;
+ char *path1 = Nullch;
+ char *path2 = Nullch;
+ int len, newsize;
/* $HKCU{"sitelib-$]"} || $HKLM{"sitelib-$]"} . ---; */
- sprintf(szRegStr, "%s-%s", szSiteLib, pl);
- sprintf(szPathStr, "site\\%s\\lib", pl);
- lpPath1 = get_sitelib_part(szRegStr, szPathStr);
+ sprintf(regstr, "%s-%s", sitelib, pl);
+ path1 = GetRegStr(regstr, &path1, &datalen);
+
+ /* $sitelib .=
+ * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/$]/lib"; */
+ sprintf(pathstr, "site\\%s\\lib", pl);
+ path1 = get_emd_part(path1, pathstr, ARCHNAME, "bin", pl, Nullch);
/* $HKCU{'sitelib'} || $HKLM{'sitelib'} . ---; */
- lpPath2 = get_sitelib_part(szSiteLib, "site\\lib");
- if (lpPath1 == NULL)
- return lpPath2;
+ path2 = GetRegStr(sitelib, &path2, &datalen);
- if (lpPath2 == NULL)
- return lpPath1;
+ /* $sitelib .=
+ * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/lib"; */
+ path2 = get_emd_part(path2, "site\\lib", ARCHNAME, "bin", pl, Nullch);
- len = strlen(lpPath1);
- newSize = len + strlen(lpPath2) + 2; /* plus one for ';' */
+ if (!path1)
+ return path2;
- lpPath1 = Renew(lpPath1, newSize, char);
- if (lpPath1 != NULL)
- {
- lpPath1[len++] = ';';
- strcpy(&lpPath1[len], lpPath2);
- }
- Safefree(lpPath2);
- return lpPath1;
+ if (!path2)
+ return path1;
+
+ len = strlen(path1);
+ newsize = len + strlen(path2) + 2; /* plus one for ';' */
+
+ Renew(path1, newsize, char);
+ path1[len++] = ';';
+ strcpy(&path1[len], path2);
+
+ Safefree(path2);
+ return path1;
}
# ifdef PERL_GLOBAL_STRUCT
# error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
# endif
-# define win32_get_stdlib PerlEnv_lib_path
+# define win32_get_privlib PerlEnv_lib_path
# define win32_get_sitelib PerlEnv_sitelib_path
#endif
extern int do_spawn(char *cmd);
extern int do_spawn_nowait(char *cmd);
extern char do_exec(char *cmd);
-extern char * win32_get_stdlib(char *pl);
+extern char * win32_get_privlib(char *pl);
extern char * win32_get_sitelib(char *pl);
extern int IsWin95(void);
extern int IsWinNT(void);