This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta for 5.31.4
[perl5.git] / win32 / makefile.mk
index feeae77..7e45914 100644 (file)
@@ -7,7 +7,7 @@
 #      Windows SDK 64-bit compiler and tools
 #
 # This is set up to build a perl.exe that runs off a shared library
-# (perl529.dll).  Also makes individual DLLs for the XS extensions.
+# (perl531.dll).  Also makes individual DLLs for the XS extensions.
 #
 
 ##
@@ -45,7 +45,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.29.2
+#INST_VER      *= \5.31.4
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -138,7 +138,7 @@ DEFAULT_INC_EXCLUDES_DOT *= define
 #CCTYPE                *= MSVC70
 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
 #CCTYPE                *= MSVC70FREE
-# Windows Server 2003 SP1 Platform SDK (April 2005)
+# Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools)
 #CCTYPE                = SDK2003SP1
 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
 #CCTYPE                *= MSVC80
@@ -154,6 +154,8 @@ DEFAULT_INC_EXCLUDES_DOT *= define
 #CCTYPE                = MSVC140
 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
 #CCTYPE                = MSVC141
+# Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
+#CCTYPE                = MSVC142
 # MinGW or mingw-w64 with gcc-3.4.5 or later
 #CCTYPE                = GCC
 
@@ -221,7 +223,7 @@ DEFAULT_INC_EXCLUDES_DOT *= define
 # set this to additionally provide a statically linked perl-static.exe.
 # Note that dynamic loading will not work with this perl, so you must
 # include required modules statically using the STATIC_EXT or ALL_STATIC
-# variables below. A static library perl529s.lib will also be created.
+# variables below. A static library perl531s.lib will also be created.
 # Ordinary perl.exe is not affected by this option.
 #
 #BUILD_STATIC  *= define
@@ -240,6 +242,9 @@ DEFAULT_INC_EXCLUDES_DOT *= define
 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
 # Visual C++.
 #
+# For GCC builds this should be the directory containing the bin, include,
+# lib directories for your compiler.
+#
 
 #CCHOME                *= C:\MinGW
 
@@ -347,6 +352,10 @@ BUILDOPT   += -DPERL_IMPLICIT_SYS
 BUILDOPT       += -DWIN32_NO_REGISTRY
 .ENDIF
 
+.IF "$(CCTYPE)" == "GCC"
+GCCTARGET      := $(shell gcc -dumpmachine & exit /b 0)
+.ENDIF
+
 #no explicit CCTYPE given, do auto detection
 .IF "$(CCTYPE)" == ""
 GCCTARGET      := $(shell gcc -dumpmachine 2>NUL & exit /b 0)
@@ -389,7 +398,7 @@ CCHOME              *= C:\MinGW
 .ELIF "$(CCTYPE)" == "MSVC60" || \
     "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
 CCHOME         *= $(MSVCDir)
-.ELIF "$(CCTYPE)" == "MSVC141"
+.ELIF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 CCHOME         *= $(VCToolsInstallDir)
 .ELSE
 CCHOME         *= $(VCINSTALLDIR)
@@ -477,7 +486,7 @@ CCINCDIR *= $(CCHOME)\include
 CCLIBDIR *= $(CCHOME)\lib
 .ELSE
 CCINCDIR *= $(CCHOME)\include
-.IF "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 .IF "$(WIN64)" == "define"
 CCLIBDIR *= $(CCHOME)\lib\x64
 .ELSE
@@ -666,7 +675,7 @@ DEFINES             = -DWIN32 -D_CONSOLE -DNO_STRICT
 LOCDEFS                = -DPERLDLL -DPERL_CORE
 CXX_FLAG       = -TP -EHsc
 
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 LIBC           = ucrt.lib
 .ELSE
 LIBC           = msvcrt.lib
@@ -679,7 +688,7 @@ LINK_DBG    = -debug
 OPTIMIZE       = -Od -MD -Zi
 LINK_DBG       = -debug
 .ELIF  "$(CFG)" == "DebugFull"
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 LIBC           = ucrtd.lib
 .ELSE
 LIBC           = msvcrtd.lib
@@ -717,10 +726,19 @@ DEFINES           += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
 .ENDIF
 
 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 DEFINES                += -D_WINSOCK_DEPRECATED_NO_WARNINGS
 .ENDIF
 
+# The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if
+# _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which
+# the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that
+# perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since
+# _MSC_VER is 1400 for this compiler (as per MSVC80).
+.IF "$(CCTYPE)" == "SDK2003SP1"
+DEFINES                += -DNO_THREAD_SAFE_LOCALE
+.ENDIF
+
 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
 # 64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
 # preprocessor option to revert back to the old functionality for
@@ -740,7 +758,7 @@ LIBBASEFILES        = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
        netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
        odbc32.lib odbccp32.lib comctl32.lib
 
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 .IF "$(CFG)" == "DebugFull"
 LIBBASEFILES   += msvcrtd.lib vcruntimed.lib
 .ELSE
@@ -756,11 +774,11 @@ LIBBASEFILES      += msvcrt.lib vcruntime.lib
 LIBBASEFILES   += libircmt.lib libmmd.lib
 .ENDIF
 
-# The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
+# The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which
 # doesn't include the buffer overrun verification code used by the /GS switch.
 # Since the code links against libraries that are compiled with /GS, this
 # "security cookie verification" code must be included via bufferoverflow.lib.
-.IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
+.IF "$(CCTYPE)" == "SDK2003SP1"
 LIBBASEFILES    += bufferoverflowU.lib
 .ENDIF
 
@@ -801,7 +819,7 @@ RSC_FLAGS   = -DINCLUDE_MANIFEST
 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
 # Console vs GUI makes no difference for DLLs, so use default for cleaner
 # building cmd lines
-.IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140"
+.IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
 .IF "$(WIN64)" == "define"
 LINK_FLAGS     += -subsystem:console,"5.02"
 .ELSE
@@ -946,8 +964,8 @@ UTILS               =                       \
 
 CFGSH_TMPL     = config.gc
 CFGH_TMPL      = config_H.gc
-PERLIMPLIB     = $(COREDIR)\libperl529$(a)
-PERLSTATICLIB  = ..\libperl529s$(a)
+PERLIMPLIB     = $(COREDIR)\libperl531$(a)
+PERLSTATICLIB  = ..\libperl531s$(a)
 INT64          = long long
 
 .ELSE
@@ -960,11 +978,11 @@ INT64             = __int64
 
 # makedef.pl must be updated if this changes, and this should normally
 # only change when there is an incompatible revision of the public API.
-PERLIMPLIB     *= $(COREDIR)\perl529$(a)
-PERLEXPLIB     *= $(COREDIR)\perl529.exp
-PERLSTATICLIB  *= ..\perl529s$(a)
-PERLDLL                = ..\perl529.dll
-PERLDLLBASE    = perl529.dll
+PERLIMPLIB     *= $(COREDIR)\perl531$(a)
+PERLEXPLIB     *= $(COREDIR)\perl531.exp
+PERLSTATICLIB  *= ..\perl531s$(a)
+PERLDLL                = ..\perl531.dll
+PERLDLLBASE    = perl531.dll
 
 #EUMM on Win32 isn't ready for parallel make, so only allow this file to be parallel
 #$(MAKE) will contain the -P that this makefile was called with, which is bad for
@@ -1165,7 +1183,7 @@ CFG_VARS  =                                       \
 # Top targets
 #
 
-all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC) PostExt
+all : CHECKDMAKE rebasePE Extensions_nonxs $(PERLSTATIC)
 
 info :
 .IF "$(CCTYPE)" == "GCC"
@@ -1317,7 +1335,7 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
        echo #undef NVgf&& \
        echo #undef USE_LONG_DOUBLE&& \
        echo #undef USE_CPLUSPLUS)>> config.h
-.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
+.IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
        @(echo #undef FILE_ptr&& \
        echo #undef FILE_cnt&& \
        echo #undef FILE_base&& \
@@ -1613,17 +1631,6 @@ rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
 .ENDIF
        $(NOOP)
 
-PostExt : ..\lib\Storable\Limit.pm
-       $(NOOP)
-
-# we need the exe, perl(ver).dll, and the Exporter, Storable, Win32 extensions
-# rebasePE most of that, including adjustment for static builds, so we
-# just need non-xs extensions
-..\lib\Storable\Limit.pm : rebasePE Extensions_nonxs
-       cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm
-       if not exist ..\lib\Storable mkdir ..\lib\Storable
-       copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
-
 #-------------------------------------------------------------------------------
 
 
@@ -1643,7 +1650,6 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
        copy ..\README.amiga    ..\pod\perlamiga.pod
        copy ..\README.android  ..\pod\perlandroid.pod
        copy ..\README.bs2000   ..\pod\perlbs2000.pod
-       copy ..\README.ce       ..\pod\perlce.pod
        copy ..\README.cn       ..\pod\perlcn.pod
        copy ..\README.cygwin   ..\pod\perlcygwin.pod
        copy ..\README.dos      ..\pod\perldos.pod
@@ -1672,7 +1678,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile
        copy ..\README.tw       ..\pod\perltw.pod
        copy ..\README.vos      ..\pod\perlvos.pod
        copy ..\README.win32    ..\pod\perlwin32.pod
-       copy ..\pod\perldelta.pod ..\pod\perl5292delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl5315delta.pod
        $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
        $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
@@ -1698,7 +1704,7 @@ distclean: realclean
        -del /f $(LIBDIR)\Time\HiRes.pm
        -del /f $(LIBDIR)\Unicode\Normalize.pm
        -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
-       -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
+       -del /f $(LIBDIR)\Storable.pm
        -del /f $(LIBDIR)\Win32.pm
        -del /f $(LIBDIR)\Win32CORE.pm
        -del /f $(LIBDIR)\Win32API\File.pm
@@ -1770,8 +1776,8 @@ distclean: realclean
        -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
        -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
        -cd $(PODDIR) && del /f *.html *.bat roffitall \
-           perl5292delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
-           perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
+           perl5315delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
            perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
            perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
            perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \