#
# Makefile to build perl on Windows using Microsoft NMAKE.
# Supported compilers:
-# Microsoft Visual C++ 6.0 or later
-# Windows SDK 64-bit compiler and tools
+# Microsoft Visual C++ 12.0 or later
#
# This is set up to build a perl.exe that runs off a shared library
-# (perl531.dll). Also makes individual DLLs for the XS extensions.
+# (perl539.dll). Also makes individual DLLs for the XS extensions.
#
##
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER = \5.31.0
+#INST_VER = \5.39.8
#
# Comment this out if you DON'T want your perl installation to have
USE_IMP_SYS = define
#
-# Comment this out if you don't want to enable large file support for
-# some reason. Should normally only be changed to maintain compatibility
-# with an older release of perl.
-#
-USE_LARGE_FILES = define
-
-#
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
-# Note: This option is not supported in 32-bit MSVC60 builds.
#
#USE_64_BIT_INT = define
#
# uncomment exactly one of the following
#
-# Visual C++ 6.0 (aka Visual C++ 98)
-#CCTYPE = MSVC60
-# Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
-#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) (64-bit compiler and tools)
-#CCTYPE = SDK2003SP1
-# Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
-#CCTYPE = MSVC80
-# Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
-#CCTYPE = MSVC90
-# Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
-#CCTYPE = MSVC100
-# Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
-#CCTYPE = MSVC110
-# Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
-#CCTYPE = MSVC120
# Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
#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
+# Visual C++ 2022 (aka Visual C++ 14.3) (full version or Community Edition)
+#CCTYPE = MSVC143
#
# If you are using Intel C++ Compiler uncomment this
#
# Uncomment this if you want to build everything in C++ mode
+# This requires at least MSVC 2019.
#
#USE_CPLUSPLUS = 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 perl531s.lib will also be created.
+# variables below. A static library perl539s.lib will also be created.
# Ordinary perl.exe is not affected by this option.
#
#BUILD_STATIC = define
# set the install location of the compiler
# Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
# Visual C++.
-# Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
-# define $(VCINSTALLDIR) instead, but from VC++ 14.1 we need the subfolder given
-# by $(VCToolsInstallDir).
-#
-!IF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
-CCHOME = $(MSVCDIR)
-!ELSEIF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
-CCHOME = $(VCTOOLSINSTALLDIR)
-!ELSE
+# Versions of Visual C++ up to VC++ 14.0 define $(VCINSTALLDIR), but from
+# VC++ 14.1 we need the subfolder given by $(VCToolsInstallDir).
+#
+!IF "$(CCTYPE)" == "MSVC140"
CCHOME = $(VCINSTALLDIR)
+!ELSE
+CCHOME = $(VCTOOLSINSTALLDIR)
!ENDIF
#
#
# set this to your email address (perl will guess a value from
-# from your loginname and your hostname, which may not be right)
+# your loginname and your hostname, which may not be right)
#
#EMAIL =
USE_IMP_SYS = undef
!ENDIF
-!IF "$(USE_LARGE_FILES)" == ""
-USE_LARGE_FILES = undef
-!ENDIF
-
!IF "$(USE_64_BIT_INT)" == ""
USE_64_BIT_INT = undef
!ENDIF
!ENDIF
!IF "$(USE_MULTI)" != "undef"
-BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+BUILDOPT = $(BUILDOPT) -DMULTIPLICITY
!ENDIF
!IF "$(USE_IMP_SYS)" != "undef"
! IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
WIN64 = define
-! ELSEIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+! ELSEIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" || "$(PROCESSOR_ARCHITECTURE)" == "ARM64"
WIN64 = define
! ELSE
WIN64 = undef
USE_64_BIT_INT = define
!ENDIF
-# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
-# both link against MSVCRT.dll (which is part of Windows itself) and
-# not against a compiler specific versioned runtime.
-!IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
-CCTYPE = SDK2003SP1
-!ENDIF
-
-# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
-# does not support it.
-!IF "$(CCTYPE)" == "MSVC60"
-!UNDEF USE_64_BIT_INT
-USE_64_BIT_INT = undef
-!ENDIF
-
-# Most relevant compiler-specific options fall into two groups:
-# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
-!IF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
-PREMSVC80 = define
-!ELSE
-PREMSVC80 = undef
-!ENDIF
-
ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+
!IF "$(ARCHITECTURE)" == "AMD64"
ARCHITECTURE = x64
!ELSEIF "$(ARCHITECTURE)" == "IA64"
ARCHITECTURE = ia64
+!ELSEIF "$(ARCHITECTURE)" == "ARM64"
+ARCHITECTURE = arm64
!ENDIF
!IF "$(USE_MULTI)" == "define"
ARCHNAME = $(ARCHNAME)-64int
!ENDIF
-# All but the free version of VC++ 7.1 can load DLLs on demand. Makes the test
-# suite run in about 10% less time.
-!IF "$(CCTYPE)" != "MSVC70FREE"
+# Loading DLLs on demand makes the test suite run in about 10% less time.
# If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
# which is rare to execute
-! IF "$(USE_NO_REGISTRY)" != "undef"
+!IF "$(USE_NO_REGISTRY)" != "undef"
DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
MINIDELAYLOAD =
-! ELSE
+!ELSE
DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
#miniperl never does any registry lookups
MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
-! ENDIF
!ENDIF
-# Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
-# DLLs. These either need copying everywhere with the binaries, or else need
-# embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
-# simplicity, embed them if they exist (and delete them afterwards so that they
-# don't get installed too).
-EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
- if exist $@.manifest del $@.manifest
-EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
- if exist $@.manifest del $@.manifest
-
# Set the install location of the compiler headers/libraries.
# These are saved into $Config{incpath} and $Config{libpth}.
CCINCDIR = $(CCHOME)\include
-!IF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
+!IF "$(CCTYPE)" == "MSVC140"
! IF "$(WIN64)" == "define"
-CCLIBDIR = $(CCHOME)\lib\x64
+CCLIBDIR = $(CCHOME)\lib\amd64
! ELSE
-CCLIBDIR = $(CCHOME)\lib\x86
+CCLIBDIR = $(CCHOME)\lib
! ENDIF
!ELSE
-! IF "$(WIN64)" == "define"
-CCLIBDIR = $(CCHOME)\lib\amd64
+! IF "$(ARCHITECTURE)" == "arm64"
+CCLIBDIR = $(CCHOME)\lib\arm64
+! ELSEIF "$(WIN64)" == "define"
+CCLIBDIR = $(CCHOME)\lib\x64
! ELSE
-CCLIBDIR = $(CCHOME)\lib
+CCLIBDIR = $(CCHOME)\lib\x86
! ENDIF
!ENDIF
# Options
#
-INCLUDES = -I$(COREDIR) -I.\include -I. -I..
+INCLUDES = -I.\include -I. -I..
#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
LOCDEFS = -DPERLDLL -DPERL_CORE
CXX_FLAG = -TP -EHsc
+!IF "$(USE_CPLUSPLUS)" == "define"
+CXX_FLAG = $(CXX_FLAG) -std:c++20
+!ENDIF
+EXTRACFLAGS = -nologo -GF -W3
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
LIBC = ucrt.lib
-!ELSE
-LIBC = msvcrt.lib
-!ENDIF
!IF "$(CFG)" == "Debug"
-OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+OPTIMIZE = -Od -Zi
LINK_DBG = -debug
+DEFINES = $(DEFINES) -DDEBUGGING
+EXTRACFLAGS = $(EXTRACFLAGS) -MD
!ELSEIF "$(CFG)" == "DebugSymbols"
-OPTIMIZE = -Od -MD -Zi
+OPTIMIZE = -Od -Zi
LINK_DBG = -debug
+EXTRACFLAGS = $(EXTRACFLAGS) -MD
!ELSEIF "$(CFG)" == "DebugFull"
-! IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
LIBC = ucrtd.lib
-! ELSE
-LIBC = msvcrtd.lib
-! ENDIF
-OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
+OPTIMIZE = -Od -Zi
LINK_DBG = -debug
+DEFINES = $(DEFINES) -D_DEBUG -DDEBUGGING
+EXTRACFLAGS = $(EXTRACFLAGS) -MDd
!ELSE
+# Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
-OPTIMIZE = -O1 -MD -Zi -DNDEBUG
+OPTIMIZE = -O1 -Zi -GL
# we enable debug symbols in release builds also
-LINK_DBG = -debug -opt:ref,icf
+LINK_DBG = -debug -opt:ref,icf -ltcg
# you may want to enable this if you want COFF symbols in the executables
# in addition to the PDB symbols. The default Dr. Watson that ships with
-# Windows can use the the former but not latter. The free WinDbg can be
+# Windows can use the former but not latter. The free WinDbg can be
# installed to get better stack traces from just the PDB symbols, so we
# avoid the bloat of COFF symbols by default.
#LINK_DBG = $(LINK_DBG) -debugtype:both
-! IF "$(CCTYPE)" != "MSVC60"
-# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
-OPTIMIZE = $(OPTIMIZE) -GL
-LINK_DBG = $(LINK_DBG) -ltcg
LIB_FLAGS = -ltcg
-! ENDIF
+EXTRACFLAGS = $(EXTRACFLAGS) -MD
!ENDIF
!IF "$(WIN64)" == "define"
-DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
+DEFINES = $(DEFINES) -DWIN64
OPTIMIZE = $(OPTIMIZE) -fp:precise
!ENDIF
-# For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
+# For now, silence warnings about "unsafe" CRT functions
# and POSIX CRT function names being deprecated.
-!IF "$(PREMSVC80)" == "undef"
-DEFINES = $(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" || "$(CCTYPE)" == "MSVC142"
-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
-# backward compatibility. We define this symbol here for older 32-bit
-# compilers only (which aren't using it at all) for the sole purpose
-# of getting it into $Config{ccflags}. That way if someone builds
-# Perl itself with e.g. VC6 but later installs an XS module using VC8
-# the time_t types will still be compatible.
-!IF "$(WIN64)" == "undef" && "$(PREMSVC80)" == "define"
-BUILDOPT = $(BUILDOPT) -D_USE_32BIT_TIME_T
-!ENDIF
+# Likewise for deprecated Winsock APIs
+DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE \
+ -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS
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" || "$(CCTYPE)" == "MSVC142"
-! IF "$(CFG)" == "DebugFull"
+!IF "$(CFG)" == "DebugFull"
LIBBASEFILES = $(LIBBASEFILES) msvcrtd.lib vcruntimed.lib
-! ELSE
+!ELSE
LIBBASEFILES = $(LIBBASEFILES) msvcrt.lib vcruntime.lib
-! ENDIF
!ENDIF
# Avoid __intel_new_proc_init link error for libircmt.
-# libmmd is /MD equivelent, other variants exist.
+# libmmd is /MD equivalent, other variants exist.
# libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
# and optimized C89 funcs
!IF "$(__ICC)" == "define"
LIBBASEFILES = $(LIBBASEFILES) libircmt.lib libmmd.lib
!ENDIF
-# 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 "$(CCTYPE)" == "SDK2003SP1"
-LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
-!ENDIF
-
LIBFILES = $(LIBBASEFILES) $(LIBC)
-#EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706
-EXTRACFLAGS = -nologo -GF -W3
!IF "$(__ICC)" == "define"
EXTRACFLAGS = $(EXTRACFLAGS) -Qstd=c99
!ENDIF
CFLAGS_O = $(CFLAGS) $(BUILDOPT)
-!IF "$(PREMSVC80)" == "undef"
-PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
-!ELSE
-RSC_FLAGS = -DINCLUDE_MANIFEST
-!ENDIF
+RSC_FLAGS =
# VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
# For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
-# 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" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
-! IF "$(WIN64)" == "define"
+# LINK_FLAGS.
+!IF "$(WIN64)" == "define"
LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.02"
-! ELSE
-LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.01"
-! ENDIF
-
!ELSE
-PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) -subsystem:console
+LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.01"
!ENDIF
BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
.SUFFIXES : .c $(o) .cpp .asm .dll .lib .exe .rc .res
.c$(o):
- $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
+ $(CC) -c -I$(FULLDIR) -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
.c.i:
- $(CC) -c -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $<
+ $(CC) -c -I$(FULLDIR) -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $<
.y.c:
$(NOOP)
$(o).dll:
$(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \
-out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
- $(EMBED_DLL_MANI)
.rc.res:
$(RSC) -i.. $(RSC_FLAGS) $<
# 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 = ..\perl531.lib
-PERLSTATICLIB = ..\perl531s.lib
-PERLDLL = ..\perl531.dll
+PERLIMPLIB = ..\perl539.lib
+PERLSTATICLIB = ..\perl539s.lib
+PERLDLL = ..\perl539.dll
MINIPERL = ..\miniperl.exe
+# contains config.h for the full perl build
+FULLDIR = .\full
MINIDIR = .\mini
PERLEXE = ..\perl.exe
WPERLEXE = ..\wperl.exe
..\utils\instmodsh \
..\utils\json_pp \
..\utils\pod2html \
+ ..\utils\streamzip \
bin\exetype.pl \
bin\runperl.pl \
bin\pl2bat.pl \
MICROCORE_SRC = \
..\av.c \
..\caretx.c \
+ ..\class.c \
+ ..\builtin.c \
..\deb.c \
..\doio.c \
..\doop.c \
..\numeric.c \
..\op.c \
..\pad.c \
+ ..\peep.c \
..\perl.c \
- ..\perlapi.c \
..\perly.c \
..\pp.c \
..\pp_ctl.c \
..\pp_sys.c \
..\reentr.c \
..\regcomp.c \
+ ..\regcomp_trie.c \
+ ..\regcomp_debug.c \
+ ..\regcomp_invlist.c \
+ ..\regcomp_study.c \
..\regexec.c \
..\run.c \
..\scope.c \
WIN32_SRC = \
.\win32.c \
- .\win32io.c \
.\win32sck.c \
.\win32thread.c \
.\fcrypt.c
..\pp.h \
..\proto.h \
..\regcomp.h \
+ ..\regcomp_internal.h \
..\regexp.h \
..\scope.h \
..\sv.h \
.\include\sys\socket.h \
.\win32.h
-CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
+CONFIG_H = $(FULLDIR)\config.h
+MINI_CONFIG_H = $(MINIDIR)\config.h
+CORE_H = $(CORE_NOCFG_H) $(CONFIG_H) ..\git_version.h
UUDMAP_H = ..\uudmap.h
BITCOUNT_H = ..\bitcount.h
"archname=$(ARCHNAME)" \
"cc=$(CC)" \
"ld=$(LINK32)" \
- "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
+ "ccflags=$(EXTRACFLAGS) $(DEFINES) $(BUILDOPT)" \
"usecplusplus=$(USE_CPLUSPLUS)" \
"cf_email=$(EMAIL)" \
"d_mymalloc=$(PERL_MALLOC)" \
"usemultiplicity=$(USE_MULTI)" \
"use64bitint=$(USE_64_BIT_INT)" \
"uselongdouble=undef" \
- "uselargefiles=$(USE_LARGE_FILES)" \
+ "usequadmath=undef" \
"usesitecustomize=$(USE_SITECUST)" \
"default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
"LINK_FLAGS=$(LINK_FLAGS:"=\")" \
"optimize=$(OPTIMIZE:"=\")" \
- "WIN64=$(WIN64)"
+ "WIN64=$(WIN64)" \
+ "SKIP_CCHOME_CHECK=$(SKIP_CCHOME_CHECK)"
#
# Top targets
regnodes : ..\regnodes.h
-..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
+..\regcomp$(o) : ..\regcomp.h ..\regcomp_internal.h ..\regnodes.h ..\regcharclass.h
+
+..\regcomp_debug$(o) : ..\regcomp.h ..\regcomp_internal.h ..\regnodes.h ..\regcharclass.h
+
+..\regcomp_invlist$(o) : ..\regcomp.h ..\regcomp_internal.h ..\regnodes.h ..\regcharclass.h
+
+..\regcomp_study$(o) : ..\regcomp.h ..\regcomp_internal.h ..\regnodes.h ..\regcharclass.h
+
+..\regcomp_trie$(o) : ..\regcomp.h ..\regcomp_internal.h ..\regnodes.h ..\regcharclass.h
..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
-reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
+reonly : regnodes $(CONFIG_H) ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
$(UNIDATAFILES) $(PERLEXE) Extensions_reonly
@echo Perl and 're' are up to date.
$(GLOBEXE) : perlglob$(o)
$(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ \
perlglob$(o) setargv$(o)
- $(EMBED_EXE_MANI)
perlglob$(o) : perlglob.c
..\perl$(o) : ..\git_version.h
..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
- $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+ $(MINIPERL) -I..\lib config_sh.PL -o ..\config.sh $(CFG_VARS) $(CFGSH_TMPL)
# This target is for when changes to the main config.sh happen.
# Edit config.vc, then make perl in a minimal configuration (i.e. with MULTI,
# ITHREADS, IMP_SYS and LARGE_FILES off), then make this target
# to regenerate config_H.vc.
regen_config_h:
- $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+ $(MINIPERL) -I..\lib config_sh.PL --prebuilt $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
$(MINIPERL) -I..\lib ..\configpm --chdir=..
-del /f $(CFGH_TMPL)
-$(MINIPERL) -I..\lib config_h.PL
rename config.h $(CFGH_TMPL)
-$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
+$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\git_version.h
$(MINIPERL) -I..\lib ..\configpm --chdir=..
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
- -$(MINIPERL) -I..\lib config_h.PL
- if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
+ if not exist "$(FULLDIR)" mkdir "$(FULLDIR)"
+ $(MINIPERL) -I..\lib config_h.PL "CONFIG_H=$(CONFIG_H)"
-.\config.h : $(CONFIGPM)
+$(CONFIG_H) : $(CONFIGPM)
# See the comment in Makefile.SH explaining this seemingly cranky ordering
$(MINIPERL) : ..\lib\buildcustomize.pl
$(LINK32) -out:$(MINIPERL) @<<
$(BLINK_FLAGS) $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
<<
- $(EMBED_EXE_MANI:..\lib\buildcustomize.pl=..\miniperl.exe)
$(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
$(MINIDIR)\.exists : $(CFGH_TMPL)
# as per the options chosen and compiler used.
# Note: This config.h is only used to build miniperl.exe anyway, but
# it's as well to have its options correct to be sure that it builds
-# and so that it's "-V" options are correct for use by makedef.pl. The
+# and so that its "-V" options are correct for use by makedef.pl. The
# real config.h used to build perl.exe is generated from the top-level
# config_h.SH by config_h.PL (run by miniperl.exe).
#
- copy $(CFGH_TMPL) config.h
+ copy $(CFGH_TMPL) $(MINI_CONFIG_H)
@(echo.&& \
echo #ifndef _config_h_footer_&& \
echo #define _config_h_footer_&& \
- echo #undef Off_t&& \
- echo #undef LSEEKSIZE&& \
- echo #undef Off_t_size&& \
echo #undef PTRSIZE&& \
echo #undef SSize_t&& \
echo #undef HAS_ATOLL&& \
echo #undef UVXf&& \
echo #undef USE_64_BIT_INT&& \
echo #undef USE_LONG_DOUBLE&& \
- echo #undef USE_CPLUSPLUS)>> config.h
-!IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
+ echo #undef USE_CPLUSPLUS)>> $(MINI_CONFIG_H)
@(echo #undef FILE_ptr&& \
echo #undef FILE_cnt&& \
echo #undef FILE_base&& \
echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
- echo #define I_STDBOOL)>> config.h
-!ENDIF
-!IF "$(USE_LARGE_FILES)"=="define"
- @(echo #define Off_t $(INT64)&& \
- echo #define LSEEKSIZE ^8&& \
- echo #define Off_t_size ^8)>> config.h
-!ELSE
- @(echo #define Off_t long&& \
- echo #define LSEEKSIZE ^4&& \
- echo #define Off_t_size ^4)>> config.h
-!ENDIF
+ echo #define I_STDBOOL)>> $(MINI_CONFIG_H)
!IF "$(WIN64)"=="define"
@(echo #define PTRSIZE ^8&& \
echo #define SSize_t $(INT64)&& \
echo #define HAS_ATOLL&& \
echo #define HAS_STRTOLL&& \
echo #define HAS_STRTOULL&& \
- echo #define Size_t_size ^8)>> config.h
+ echo #define Size_t_size ^8)>> $(MINI_CONFIG_H)
!ELSE
@(echo #define PTRSIZE ^4&& \
echo #define SSize_t int&& \
echo #undef HAS_ATOLL&& \
echo #undef HAS_STRTOLL&& \
echo #undef HAS_STRTOULL&& \
- echo #define Size_t_size ^4)>> config.h
+ echo #define Size_t_size ^4)>> $(MINI_CONFIG_H)
!ENDIF
!IF "$(USE_64_BIT_INT)"=="define"
@(echo #define IVTYPE $(INT64)&& \
echo #define UVof "I64o"&& \
echo #define UVxf "I64x"&& \
echo #define UVXf "I64X"&& \
- echo #define USE_64_BIT_INT)>> config.h
+ echo #define USE_64_BIT_INT)>> $(MINI_CONFIG_H)
!ELSE
@(echo #define IVTYPE long&& \
echo #define UVTYPE unsigned long&& \
echo #define UVof "lo"&& \
echo #define UVxf "lx"&& \
echo #define UVXf "lX"&& \
- echo #undef USE_64_BIT_INT)>> config.h
+ echo #undef USE_64_BIT_INT)>> $(MINI_CONFIG_H)
!ENDIF
!IF "$(USE_CPLUSPLUS)"=="define"
@(echo #define USE_CPLUSPLUS&& \
- echo #endif)>> config.h
+ echo #endif)>> $(MINI_CONFIG_H)
!ELSE
@(echo #undef USE_CPLUSPLUS&& \
- echo #endif)>> config.h
+ echo #endif)>> $(MINI_CONFIG_H)
!ENDIF
#separate line since this is sentinal that this target is done
@rem. > $(MINIDIR)\.exists
+.c{$(MINIDIR)}$(o):
+ $(CC) -c -Imini $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $<
+
+{..\}.c{$(MINIDIR)}$(o):
+ $(CC) -c -Imini $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $<
+
$(MINICORE_OBJ) : $(CORE_NOCFG_H)
- $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
- $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
!IF "$(USE_IMP_SYS)" == "define"
perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
- $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+ $(CC) -c -I$(FULLDIR) -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
!ENDIF
-# 1. we don't want to rebuild miniperl.exe when config.h changes
-# 2. we don't want to rebuild miniperl.exe with non-default config.h
-# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
+# We can't have miniperl.exe depend on git_version.h, as miniperl creates it
$(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
$(WIN32_OBJ) : $(CORE_H)
$(CORE_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
-perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
+perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl ..\git_version.h
$(MINIPERL) -I..\lib create_perllibst_h.pl
- $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
+ $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 CONFIG_H=$(CONFIG_H) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
- $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<<
+ $(LINK32) -dll -def:perldll.def -out:$@ @Extensions_static @<<
$(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
<<
- $(EMBED_DLL_MANI)
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
$(PERLSTATICLIB): Extensions_static
$(LINK32) -out:$@ @<<
$(BLINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ)
<<
- $(EMBED_EXE_MANI)
perlmain.c : runperl.c
copy runperl.c perlmain.c
perlmain$(o) : perlmain.c
- $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
+ $(CC) -I$(FULLDIR) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
perlmainst.c : runperl.c
copy runperl.c perlmainst.c
perlmainst$(o) : perlmainst.c
- $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
+ $(CC) -I$(FULLDIR) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
$(LINK32) -out:$@ $(BLINK_FLAGS) \
$(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
- $(EMBED_EXE_MANI)
copy $(PERLEXE) $(WPERLEXE)
$(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
$(LINK32) -out:$@ $(BLINK_FLAGS) \
$(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
- $(EMBED_EXE_MANI)
MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
$(MINIPERL) -I..\lib ..\mkppport
Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
- $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
+ $(MINIPERL) -I..\lib list_static_libs.pl -o Extensions_static
Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
$(XCOPY) ..\*.h $(COREDIR)\*.*
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
copy ..\README.freebsd ..\pod\perlfreebsd.pod
copy ..\README.haiku ..\pod\perlhaiku.pod
copy ..\README.hpux ..\pod\perlhpux.pod
copy ..\README.jp ..\pod\perljp.pod
copy ..\README.ko ..\pod\perlko.pod
copy ..\README.linux ..\pod\perllinux.pod
- copy ..\README.macos ..\pod\perlmacos.pod
copy ..\README.macosx ..\pod\perlmacosx.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.qnx ..\pod\perlqnx.pod
copy ..\README.riscos ..\pod\perlriscos.pod
copy ..\README.solaris ..\pod\perlsolaris.pod
- copy ..\README.symbian ..\pod\perlsymbian.pod
copy ..\README.synology ..\pod\perlsynology.pod
copy ..\README.tru64 ..\pod\perltru64.pod
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5311delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5398delta.pod
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
- $(MINIPERL) -I..\lib ..\autodoc.pl ..
+ $(MINIPERL) -I..\lib ..\autodoc.pl -c "win32\$(CONFIG_H)" ..
$(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
-if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
-if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
-if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
+ -if exist $(LIBDIR)\Getopt\Long rmdir /s /q $(LIBDIR)\Getopt\Long
-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
-if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
-if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
-if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
-if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
-if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
+ -if exist $(LIBDIR)\Pod\Html rmdir /s /q $(LIBDIR)\Pod\Html
-if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
-if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
-if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
-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 \
- perl5311delta.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 \
- perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
- perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
- perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
- perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
+ perl5398delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
+ perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
+ perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
+ perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
+ perlmacosx.pod perlmodlib.pod perlopenbsd.pod perlos2.pod \
+ perlos390.pod perlos400.pod perlplan9.pod perlqnx.pod \
+ perlriscos.pod perlsolaris.pod perlsynology.pod perltoc.pod \
perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
perlwin32.pod
-cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
- perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
+ perldoc perlivp libnetcfg enc2xs encguess piconv cpan streamzip *.bat \
xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
-del /f ..\config.sh perlmain.c dlutils.c config.h.new \
perlmainst.c
cd ..\lib\unicore && \
..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
-minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES)
+minitest : $(CONFIG_H) $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES)
$(XCOPY) $(MINIPERL) ..\t\$(NULL)
if exist ..\t\perl.exe del /f ..\t\perl.exe
rename ..\t\miniperl.exe perl.exe
test : test-prep
cd ..\t
- perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
+ perl.exe harness $(TEST_ARGS) $(TEST_SWITCHES) $(TEST_FILES)
cd ..\win32
test_porting : test-prep
cd ..\t
- perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
+ perl.exe harness $(TEST_ARGS) $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
cd ..\win32
test-reonly : reonly utils
test-notty : test-prep
set PERL_SKIP_TTY_TEST=1
cd ..\t
- perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
+ perl.exe harness $(TEST_ARGS) $(TEST_SWITCHES) $(TEST_FILES)
cd ..\win32
_test :
$(XCOPY) $(PERLDLL) ..\t\$(NULL)
$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
cd ..\t
- perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
+ perl.exe harness $(TEST_ARGS) $(TEST_SWITCHES) $(TEST_FILES)
cd ..\win32
_clean :