From: Steve Hay Date: Thu, 31 Mar 2005 14:36:44 +0000 (+0000) Subject: Add support for USE_SITECUSTOMIZE in the Win32 makefiles X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ada00a0afea1d7eec1411de227ec2e27211e619;p=p5sagit%2Fp5-mst-13.2.git Add support for USE_SITECUSTOMIZE in the Win32 makefiles Note that this feature doesn't actually work correctly on Win32 until the problem described here is solved: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2005-03/msg00740.html p4raw-id: //depot/perl@24120 --- diff --git a/win32/Makefile b/win32/Makefile index d63d602..a062526 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -46,6 +46,14 @@ INST_TOP = $(INST_DRV)\perl #INST_ARCH = \$(ARCHNAME) # +# Uncomment this if you want perl to run +# $Config{sitelibexp}\sitecustomize.pl +# before anything else. This script can then be set up, for example, +# to add additional entries to @INC. +# +#USE_SITECUST = define + +# # uncomment to enable multiple interpreters. This is need for fork() # emulation and for thread support. # @@ -160,6 +168,7 @@ CCLIBDIR = $(CCHOME)\lib # Additional compiler flags can be specified here. # +# # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's # internal hash function unless the PERL_HASH_SEED environment variable is set. # Alternatively, adding -DNO_HASH_SEED will completely disable the @@ -234,6 +243,10 @@ DEBUG_MSTATS = undef BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS !ENDIF +!IF "$(USE_SITECUST)" == "" +USE_SITECUST = undef +!ENDIF + !IF "$(USE_MULTI)" == "" USE_MULTI = undef !ENDIF @@ -266,6 +279,10 @@ USE_MULTI = define USE_MULTI = define !ENDIF +!IF "$(USE_SITECUST)" == "define" +BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE +!ENDIF + !IF "$(USE_MULTI)" != "undef" BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT !ENDIF @@ -835,6 +852,7 @@ CFG_VARS = \ "usemultiplicity=$(USE_MULTI)" \ "useperlio=$(USE_PERLIO)" \ "uselargefiles=$(USE_LARGE_FILES)" \ + "usesitecustomize=$(USE_SITECUST)" \ "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ "optimize=$(OPTIMIZE:"=\")" diff --git a/win32/config.bc b/win32/config.bc index c920a41..55c8562 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -923,6 +923,7 @@ useposix='true' usereentrant='undef' usesfio='false' useshrplib='yes' +usesitecustomize='~USE_SITECUST~' usesocks='undef' usethreads='undef' usevendorprefix='undef' diff --git a/win32/config.gc b/win32/config.gc index 925eab2..03f34d6 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -922,6 +922,7 @@ useposix='true' usereentrant='undef' usesfio='false' useshrplib='yes' +usesitecustomize='~USE_SITECUST~' usesocks='undef' usethreads='undef' usevendorprefix='undef' diff --git a/win32/config.vc b/win32/config.vc index 3c97a0b..d0a3a3c 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -922,6 +922,7 @@ useposix='true' usereentrant='undef' usesfio='false' useshrplib='yes' +usesitecustomize='~USE_SITECUST~' usesocks='undef' usethreads='undef' usevendorprefix='undef' diff --git a/win32/config.vc64 b/win32/config.vc64 index 3994642..de484fe 100644 --- a/win32/config.vc64 +++ b/win32/config.vc64 @@ -922,6 +922,7 @@ useposix='true' usereentrant='undef' usesfio='false' useshrplib='yes' +usesitecustomize='~USE_SITECUST~' usesocks='undef' usethreads='undef' usevendorprefix='undef' diff --git a/win32/makefile.mk b/win32/makefile.mk index 9e11fec..5502526 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -48,6 +48,14 @@ INST_TOP *= $(INST_DRV)\perl #INST_ARCH *= \$(ARCHNAME) # +# Uncomment this if you want perl to run +# $Config{sitelibexp}\sitecustomize.pl +# before anything else. This script can then be set up, for example, +# to add additional entries to @INC. +# +#USE_SITECUST *= define + +# # uncomment to enable multiple interpreters. This is need for fork() # emulation and for thread support. # @@ -251,6 +259,7 @@ CRYPT_FLAG = -DHAVE_DES_FCRYPT PERL_MALLOC *= undef DEBUG_MSTATS *= undef +USE_SITECUST *= undef USE_MULTI *= undef USE_ITHREADS *= undef USE_IMP_SYS *= undef @@ -278,6 +287,10 @@ USE_MULTI != define USE_MULTI != define .ENDIF +.IF "$(USE_SITECUST)" == "define" +BUILDOPT += -DUSE_SITECUSTOMIZE +.ENDIF + .IF "$(USE_MULTI)" != "undef" BUILDOPT += -DPERL_IMPLICIT_CONTEXT .ENDIF @@ -885,6 +898,7 @@ CFG_VARS = \ usemultiplicity=$(USE_MULTI) ~ \ useperlio=$(USE_PERLIO) ~ \ uselargefiles=$(USE_LARGE_FILES) ~ \ + usesitecustomize=$(USE_SITECUST) ~ \ LINK_FLAGS=$(LINK_FLAGS:s,\,$B,) ~ \ optimize=$(OPTIMIZE)