Add support for USE_SITECUSTOMIZE in the Win32 makefiles
Steve Hay [Thu, 31 Mar 2005 14:36:44 +0000 (14:36 +0000)]
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

win32/Makefile
win32/config.bc
win32/config.gc
win32/config.vc
win32/config.vc64
win32/makefile.mk

index d63d602..a062526 100644 (file)
@@ -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:"=\")"
 
index c920a41..55c8562 100644 (file)
@@ -923,6 +923,7 @@ useposix='true'
 usereentrant='undef'
 usesfio='false'
 useshrplib='yes'
+usesitecustomize='~USE_SITECUST~'
 usesocks='undef'
 usethreads='undef'
 usevendorprefix='undef'
index 925eab2..03f34d6 100644 (file)
@@ -922,6 +922,7 @@ useposix='true'
 usereentrant='undef'
 usesfio='false'
 useshrplib='yes'
+usesitecustomize='~USE_SITECUST~'
 usesocks='undef'
 usethreads='undef'
 usevendorprefix='undef'
index 3c97a0b..d0a3a3c 100644 (file)
@@ -922,6 +922,7 @@ useposix='true'
 usereentrant='undef'
 usesfio='false'
 useshrplib='yes'
+usesitecustomize='~USE_SITECUST~'
 usesocks='undef'
 usethreads='undef'
 usevendorprefix='undef'
index 3994642..de484fe 100644 (file)
@@ -922,6 +922,7 @@ useposix='true'
 usereentrant='undef'
 usesfio='false'
 useshrplib='yes'
+usesitecustomize='~USE_SITECUST~'
 usesocks='undef'
 usethreads='undef'
 usevendorprefix='undef'
index 9e11fec..5502526 100644 (file)
@@ -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)