This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #133494) better document CCHOME for GCC builds
[perl5.git] / win32 / Makefile
index 1faa7b3..603e97b 100644 (file)
@@ -38,7 +38,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.1
+#INST_VER      = \5.29.4
 
 #
 # Comment this out if you DON'T want your perl installation to have
@@ -117,7 +117,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
@@ -474,11 +474,12 @@ INST_HTML = $(INST_TOP)$(INST_VER)\html
 # Programs to compile, build .lib files and link
 #
 
-#poison the recipe if no CCTYPE is set, and delete mini config.h if it was
-#written with no sane CC version set so the world is rebuilt
+# Poison the recipe if no CCTYPE is set, and delete mini\.exists so everything
+# is rebuilt next time to avoid reusing a mini config.h written with no sane CC
+# version set
 !IF "$(CCTYPE)" == ""
 CC             = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
-LINK32 = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
+LINK32         = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
 !ELSE IF "$(__ICC)" != "define"
 CC             = cl
 LINK32         = link
@@ -558,6 +559,15 @@ DEFINES            = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
 DEFINES                = $(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                = $(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
@@ -594,11 +604,11 @@ LIBBASEFILES      = $(LIBBASEFILES) msvcrt.lib vcruntime.lib
 LIBBASEFILES   = $(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    = $(LIBBASEFILES) bufferoverflowU.lib
 !ENDIF
 
@@ -1291,7 +1301,7 @@ utils: $(PERLEXE) ..\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\perl5291delta.pod
+       copy ..\pod\perldelta.pod ..\pod\perl5294delta.pod
        cd ..\win32
        $(PERLEXE) $(PL2BAT) $(UTILS)
        $(MINIPERL) -I..\lib ..\autodoc.pl ..
@@ -1391,7 +1401,7 @@ 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 \
-           perl5291delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+           perl5294delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
            perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
            perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
            perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \