Subs with builtin attributes shouldn't be made constant
[p5sagit/p5-mst-13.2.git] / win32 / makefile.mk
index 9e11fec..430913e 100644 (file)
@@ -34,7 +34,7 @@ INST_TOP      *= $(INST_DRV)\perl
 # versioned installation can be obtained by setting INST_TOP above to a
 # path that includes an arbitrary version string.
 #
-#INST_VER      *= \5.9.2
+#INST_VER      *= \5.9.3
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -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.
 #
@@ -184,6 +192,7 @@ CCLIBDIR    *= $(CCHOME)\lib
 #
 # Additional compiler flags can be specified here.
 #
+BUILDOPT       *= $(BUILDOPTEXTRA)
 
 #
 # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's
@@ -251,6 +260,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 +288,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
@@ -364,7 +378,7 @@ LINK32              = tlink32
 .ENDIF
 LIB32          = tlib /P128
 IMPLIB         = implib -c
-RSC            = rc
+RSC            = brcc32
 
 #
 # Options
@@ -377,7 +391,7 @@ SUBSYS              = console
 CXX_FLAG       = -P
 
 LIBC           = cw32mti.lib
-LIBFILES       = $(CRYPT_LIB) import32.lib $(LIBC)
+LIBFILES       = $(CRYPT_LIB) ws2_32.lib import32.lib $(LIBC)
 
 .IF  "$(CFG)" == "Debug"
 OPTIMIZE       = -v -D_RTLDLL -DDEBUGGING
@@ -553,12 +567,23 @@ BLINK_FLAGS       = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
 # require backslashes to be doubled-up when written to $(mktmp) files.
 # Other dmake's do not require this and would actually output a double
 # backslash if they were doubled-up.
-.IF "$(shell type $(mktmp \\))"=="\\"
+.IF "$(shell @type $(mktmp \\))"=="\\"
 B=\\
 .ELSE
 B=\\\
 .ENDIF
 
+# There is a related issue with other escape sequences: Sarathy's old
+# dmake automatically maps escape sequences like \n to their ASCII values
+# when used in macros, while other dmake's only do so if this behaviour
+# is explicitly requested with the :m modifier.
+DONTUSETHIS=\n
+.IF "$(shell @type $(mktmp \n))"=="\n"
+N=$(DONTUSETHIS:m)
+.ELSE
+N=$(DONTUSETHIS)
+.ENDIF
+
 o *= .obj
 a *= .lib
 
@@ -842,7 +867,7 @@ DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
                Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
                Sys/Hostname Storable Filter/Util/Call Encode \
                Digest/MD5 PerlIO/scalar MIME/Base64 Time/HiRes \
-               Unicode/Normalize Win32
+               Unicode/Normalize Math/BigInt/FastCalc Compress/Zlib Win32
 STATIC_EXT     = 
 NONXS_EXT      = Errno
 
@@ -885,6 +910,7 @@ CFG_VARS    =                                       \
                usemultiplicity=$(USE_MULTI)    ~       \
                useperlio=$(USE_PERLIO)         ~       \
                uselargefiles=$(USE_LARGE_FILES)        ~       \
+               usesitecustomize=$(USE_SITECUST)        ~       \
                LINK_FLAGS=$(LINK_FLAGS:s,\,$B,)        ~       \
                optimize=$(OPTIMIZE)
 
@@ -1060,15 +1086,15 @@ perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
 .IF "$(CCTYPE)" == "BORLAND"
        $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
-           @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,$B,)\n \
-               $@,\n \
-               $(LIBFILES)\n \
-               perldll.def\n)
+           @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,$B,)$N \
+               $@,$N \
+               $(shell @type Extensions_static) $(LIBFILES)$N \
+               perldll.def$N)
        $(IMPLIB) $*.lib $@
 .ELIF "$(CCTYPE)" == "GCC"
        $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
            $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,$B,) \
-               $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs|tr \\\\ /) \
+               $(shell @type Extensions_static) \
                $(LIBFILES) $(LKPOST))
        dlltool --output-lib $(PERLIMPLIB) \
                --dllname $(PERLDLL:b).dll \
@@ -1077,11 +1103,11 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
                --output-exp perl.exp
        $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
            $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,$B,) \
-               $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs|tr \\\\ /) \
+               $(shell @type Extensions_static) \
                $(LIBFILES) perl.exp $(LKPOST))
 .ELSE
        $(LINK32) -dll -def:perldll.def -out:$@ \
-           $(shell $(MINIPERL) -I..\lib buildext.pl --list-static-libs) \
+           @Extensions_static \
            @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
                $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,$B,))
 .ENDIF
@@ -1134,9 +1160,9 @@ perlmain$(o) : perlmain.c
 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
 .IF "$(CCTYPE)" == "BORLAND"
        $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
-           @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,$B,)\n \
-           $(@:s,\,$B,),\n \
-           $(PERLIMPLIB) $(LIBFILES)\n)
+           @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,$B,)$N \
+           $(@:s,\,$B,),$N \
+           $(PERLIMPLIB) $(LIBFILES)$N)
 .ELIF "$(CCTYPE)" == "GCC"
        $(LINK32) -mconsole -o $@ $(BLINK_FLAGS)  \
            $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
@@ -1161,29 +1187,25 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
        copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
 
-#----------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
 Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic
 
 Extensions_static : buildext.pl
-       $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
        $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
-
-# Note: The next two targets explicitly remove a "blibdirs.exists" file that
-# currerntly gets left behind, until CPAN RT Ticket #5616 is resolved.
+       $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
+       $(MINIPERL) -I..\lib buildext.pl --list-static-libs > Extensions_static
 
 Extensions_clean :
        -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
        -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
-       -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
 
 Extensions_realclean :
        -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean
        -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean
-       -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
 
-#----------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
 
 
 doc: $(PERLEXE)
@@ -1219,12 +1241,14 @@ utils: $(PERLEXE) $(X2P)
        copy ..\README.mint     ..\pod\perlmint.pod
        copy ..\README.mpeix    ..\pod\perlmpeix.pod
        copy ..\README.netware  ..\pod\perlnetware.pod
+       copy ..\README.openbsd  ..\pod\perlopenbsd.pod
        copy ..\README.os2      ..\pod\perlos2.pod
        copy ..\README.os390    ..\pod\perlos390.pod
        copy ..\README.os400    ..\pod\perlos400.pod
        copy ..\README.plan9    ..\pod\perlplan9.pod
        copy ..\README.qnx      ..\pod\perlqnx.pod
        copy ..\README.solaris  ..\pod\perlsolaris.pod
+       copy ..\README.symbian  ..\pod\perlsymbian.pod
        copy ..\README.tru64    ..\pod\perltru64.pod
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.uts      ..\pod\perluts.pod
@@ -1232,7 +1256,7 @@ utils: $(PERLEXE) $(X2P)
        copy ..\README.vms      ..\pod\perlvms.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perl592delta.pod ..\pod\perldelta.pod
+       copy ..\pod\perl593delta.pod ..\pod\perldelta.pod
        cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
        cd ..\lib && $(PERLEXE) lib_pm.PL
        $(PERLEXE) $(PL2BAT) $(UTILS)
@@ -1272,9 +1296,10 @@ distclean: realclean
        -del /f $(LIBDIR)\threads\shared.pm
        -del /f $(LIBDIR)\Time\HiRes.pm
        -del /f $(LIBDIR)\Unicode\Normalize.pm
+       -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
        -del /f $(LIBDIR)\Win32.pm
-       -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
-       -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
+       -if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
+       -if exist $(LIBDIR)\IO\Socket rmdir /s $(LIBDIR)\IO\Socket
        -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
        -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
        -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
@@ -1302,10 +1327,10 @@ distclean: realclean
            perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
            perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
            perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
-           perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
-           perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \
-           perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
-           perlwin32.pod \
+           perlopenbsd.pod perlos2.pod perlos390.pod perlos400.pod \
+           perlplan9.pod perlqnx.pod perlsolaris.pod perlsymbian.pod \
+           perltru64.pod perltw.pod perluts.pod perlvmesa.pod perlvms.pod \
+           perlvms.pod perlvos.pod perlwin32.pod \
            pod2html pod2latex pod2man pod2text pod2usage \
            podchecker podselect
        -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
@@ -1414,6 +1439,7 @@ _clean :
        -@erase ..\x2p\*.exe ..\x2p\*.bat
        -@erase *.ilk
        -@erase *.pdb
+       -@erase Extensions_static
 
 clean : Extensions_clean _clean