2 # Makefile to build perl on Windows using GMAKE.
4 # Microsoft Visual C++ 12.0 or later
5 # MinGW with gcc-3.4.5-5.3.0
6 # MinGW64 with gcc-4.4.3 or later
8 # This is set up to build a perl.exe that runs off a shared library
9 # (perl535.dll). Also makes individual DLLs for the XS extensions.
11 # The easiest way to customize the build process is to use parameters like this:
13 # c:\dev\perlsrc\win32> gmake INST_TOP=c:\sw\perl CCHOME=c:\sw\mingw USE_64_BIT_INT=define
17 ## Make sure you read README.win32 *before* you mess with anything here!
21 # We set this to point to cmd.exe in case GNU Make finds sh.exe in the path.
22 # Comment this line out if necessary
26 # define whether you want to use native gcc compiler or cross-compiler
27 # possible values: gcc
28 # i686-w64-mingw32-gcc
29 # x86_64-w64-mingw32-gcc
32 ifeq ($(GCCBIN),x86_64-w64-mingw32-gcc)
33 GCCCROSS := x86_64-w64-mingw32
35 ifeq ($(GCCBIN),i686-w64-mingw32-gcc)
36 GCCCROSS := i686-w64-mingw32
41 ## Build configuration. Edit the values below to suit your needs.
45 # Set these to wherever you want "gmake install" to put your
49 INST_TOP := $(INST_DRV)\perl
52 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
53 # on a 64-bit version of Windows.
58 # Comment this out if you DON'T want your perl installation to be versioned.
59 # This means that the new installation will overwrite any files from the
60 # old installation at the same INST_TOP location. Leaving it enabled is
61 # the safest route, as perl adds the extra version directory to all the
62 # locations it installs files to. If you disable it, an alternative
63 # versioned installation can be obtained by setting INST_TOP above to a
64 # path that includes an arbitrary version string.
69 # Comment this out if you DON'T want your perl installation to have
70 # architecture specific components. This means that architecture-
71 # specific files will be installed along with the architecture-neutral
72 # files. Leaving it enabled is safer and more flexible, in case you
73 # want to build multiple flavors of perl and install them together in
74 # the same location. Commenting it out gives you a simpler
75 # installation that is easier to understand for beginners.
77 #INST_ARCH := \$(ARCHNAME)
80 # Uncomment this if you want perl to run
81 # $Config{sitelibexp}\sitecustomize.pl
82 # before anything else. This script can then be set up, for example,
83 # to add additional entries to @INC.
85 #USE_SITECUST := define
88 # uncomment to enable multiple interpreters. This is needed for fork()
89 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
90 # and USE_ITHREADS below.
95 # Interpreter cloning/threads; now reasonably complete.
96 # This should be enabled to get the fork() emulation. This needs (and
97 # will auto-enable) USE_MULTI above.
99 USE_ITHREADS := define
102 # uncomment to enable the implicit "host" layer for all system calls
103 # made by perl. This is also needed to get fork(). This needs (and
104 # will auto-enable) USE_MULTI above.
106 USE_IMP_SYS := define
109 # Comment out next assign to disable perl's I/O subsystem and use compiler's
110 # stdio for IO - depending on your compiler vendor and run time library you may
111 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
112 # You will also be unable to take full advantage of perl5.8's support for multiple
113 # encodings and may see lower IO performance. You have been warned.
118 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
119 # (If you're building a 64-bit perl then you will have 64-bit integers whether
120 # or not this is uncommented.)
122 #USE_64_BIT_INT := define
125 # Uncomment this if you want to support the use of long doubles in GCC builds.
126 # This option is not supported for MSVC builds.
128 #USE_LONG_DOUBLE := define
131 # Uncomment these if you want to support the use of __float128 in GCC builds.
132 # This option is not supported for MSVC builds.
134 #USE_QUADMATH := define
135 #I_QUADMATH := define
138 # Comment this out if you want to build perl without __USE_MINGW_ANSI_STDIO defined.
139 # (If you're building perl with USE_LONG_DOUBLE defined then
140 # __USE_MINGW_ANSI_STDIO will be defined whether or not this is uncommented.)
141 # The advantage of defining __USE_MINGW_ANSI_STDIO is that it provides correct
142 # (s)printf formatting of numbers, whereas the MS runtime might not.
143 # This option has no effect on MSVC builds.
145 USE_MINGW_ANSI_STDIO := define
148 # Comment this out if you want the legacy default behavior of including '.' at
151 DEFAULT_INC_EXCLUDES_DOT := define
154 # Uncomment this if you want to disable looking up values from
155 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
158 #USE_NO_REGISTRY := define
161 # uncomment exactly one of the following
163 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
165 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
167 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
169 # Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
171 # Visual C++ 2022 (aka Visual C++ 14.3) (full version or Community Edition)
173 # MinGW or mingw-w64 with gcc-3.4.5 or later
177 # If you are using Intel C++ Compiler uncomment this
182 # Uncomment this if you want to build everything in C++ mode
184 #USE_CPLUSPLUS := define
187 # uncomment next line if you want debug version of perl (big/slow)
188 # If not enabled, we automatically try to use maximum optimization
189 # with all compilers that are known to have a working optimizer.
194 # uncomment to enable linking with setargv.obj under the Visual C
195 # compiler. Setting this options enables perl to expand wildcards in
196 # arguments, but it may be harder to use alternate methods like
197 # File::DosGlob that are more powerful. This option is supported only with
200 #USE_SETARGV := define
203 # set this if you wish to use perl's malloc
204 # WARNING: Turning this on/off WILL break binary compatibility with extensions
205 # you may have compiled with/without it. Be prepared to recompile all
206 # extensions if you change the default. Currently, this cannot be enabled
207 # if you ask for USE_IMP_SYS above.
209 #PERL_MALLOC := define
212 # set this to enable debugging mstats
213 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
214 # be enabled without PERL_MALLOC as well.
216 #DEBUG_MSTATS := define
219 # set this to additionally provide a statically linked perl-static.exe.
220 # Note that dynamic loading will not work with this perl, so you must
221 # include required modules statically using the STATIC_EXT or ALL_STATIC
222 # variables below. A static library perl535s.lib will also be created.
223 # Ordinary perl.exe is not affected by this option.
225 #BUILD_STATIC := define
228 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
229 # extension get statically built.
230 # This will result in a very large perl executable, but the main purpose
231 # is to have proper linking set so as to be able to create miscellaneous
232 # executables with different built-in extensions. It implies BUILD_STATIC.
234 #ALL_STATIC := define
237 # set the install locations of the compiler
238 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
241 # For GCC builds this should be the directory containing the bin, include,
242 # lib directories for your compiler.
247 # Additional compiler flags can be specified here.
249 BUILDOPT := $(BUILDOPTEXTRA)
252 # This should normally be disabled. Enabling it will disable the File::Glob
253 # implementation of CORE::glob.
255 #BUILDOPT += -DPERL_EXTERNAL_GLOB
258 # Perl needs to read scripts in text mode so that the DATA filehandle
259 # works correctly with seek() and tell(), or around auto-flushes of
260 # all filehandles (e.g. by system(), backticks, fork(), etc).
262 # The current version on the ByteLoader module on CPAN however only
263 # works if scripts are read in binary mode. But before you disable text
264 # mode script reading (and break some DATA filehandle functionality)
265 # please check first if an updated ByteLoader isn't available on CPAN.
267 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
270 # specify semicolon-separated list of extra directories that modules will
271 # look for libraries (spaces in path names need not be quoted)
276 # set this to your email address (perl will guess a value from
277 # your loginname and your hostname, which may not be right)
282 ## Build configuration ends.
285 ##################### CHANGE THESE ONLY IF YOU MUST #####################
288 DEBUG_MSTATS ?= undef
290 USE_SITECUST ?= undef
292 USE_ITHREADS ?= undef
295 USE_LARGE_FILES ?= undef
296 USE_64_BIT_INT ?= undef
297 USE_LONG_DOUBLE ?= undef
298 USE_QUADMATH ?= undef
300 DEFAULT_INC_EXCLUDES_DOT ?= undef
301 USE_NO_REGISTRY ?= undef
303 ifeq ($(USE_IMP_SYS),define)
307 ifeq ($(PERL_MALLOC),undef)
311 ifeq ($(DEBUG_MSTATS),define)
312 BUILDOPT += -DPERL_DEBUGGING_MSTATS
315 ifeq ("$(USE_IMP_SYS) $(USE_MULTI)","define undef")
319 ifeq ("$(USE_ITHREADS) $(USE_MULTI)","define undef")
323 ifeq ($(USE_SITECUST),define)
324 BUILDOPT += -DUSE_SITECUSTOMIZE
327 ifneq ($(USE_MULTI),undef)
328 BUILDOPT += -DMULTIPLICITY
331 ifneq ($(USE_IMP_SYS),undef)
332 BUILDOPT += -DPERL_IMPLICIT_SYS
335 ifeq ($(USE_NO_REGISTRY),define)
336 BUILDOPT += -DWIN32_NO_REGISTRY
340 GCCTARGET := $(shell $(GCCBIN) -dumpmachine)
343 #no explicit CCTYPE given, do auto detection
345 GCCTARGET := $(shell $(GCCBIN) -dumpmachine 2>NUL)
347 ifneq ($(GCCTARGET),)
350 WIN64 := $(shell for /f "tokens=3 delims=.^ " \
351 %%i in ('cl ^2^>^&1') do @if "%%i" == "32-bit" echo undef)
352 #major version of CL has diff position based on 32 vs 64
353 #Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
354 #Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
355 #use var to capture 1st line only, not 8th token of lines 2 & 3 in cl.exe output
356 #removing the cmd /c (extra scope) on the echo causes the env var to be undef
357 #when echo executes but it isn't undef for the "set MSVCVER", gmake or
359 ifeq ($(WIN64),undef)
360 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=8,9 delims=.^ " \
361 %%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
362 (set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
363 else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
365 MSVCVER := $(shell (set MSVCVER=) & (for /f "tokens=7,8 delims=.^ " \
366 %%i in ('cl ^2^>^&1') do if not defined MSVCVER if %%i%% geq 19 \
367 (set /A "MSVCVER=((%%i-5)*10)+(%%j/10)") \
368 else (set /A "MSVCVER=(%%i-6)*10")) & cmd /c echo %%MSVCVER%%)
370 #autodetect failed, reset to empty string
371 ifeq ($(MSVCVER),-50)
374 CCTYPE := MSVC$(MSVCVER)
379 # Versions of Visual C++ up to VC++ 14.0 define $(VCINSTALLDIR), but for
380 # VC++ 14.1 we need the subfolder given by $(VCToolsInstallDir).
384 else ifeq ($(CCTYPE),MSVC120)
385 CCHOME := $(VCINSTALLDIR)
386 else ifeq ($(CCTYPE),MSVC140)
387 CCHOME := $(VCINSTALLDIR)
389 CCHOME := $(VCToolsInstallDir)
393 # Check processor architecture from target triplet
395 # gcc: i686-w64-mingw32, x86_64-w64-mingw32
396 # clang: i686-w64-windows-gnu, x86_64-w64-windows-gnu
398 ifeq (x86_64, $(findstring x86_64, $(GCCTARGET)))
400 PROCESSOR_ARCHITECTURE := x64
402 ifeq (i686, $(findstring i686, $(GCCTARGET)))
404 PROCESSOR_ARCHITECTURE := x86
408 PROCESSOR_ARCHITECTURE ?= x86
410 ifeq ($(WIN64),undef)
411 PROCESSOR_ARCHITECTURE = x86
415 # When we are running from a 32bit cmd.exe on AMD64 then
416 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
418 ifneq ($(PROCESSOR_ARCHITEW6432),)
419 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
421 else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
423 else ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
430 ifeq ($(WIN64),define)
431 USE_64_BIT_INT = define
434 # Disable the long double option for MSVC builds since that compiler
435 # does not support it.
436 ifneq ($(CCTYPE),GCC)
437 USE_LONG_DOUBLE = undef
442 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
443 ifeq ($(ARCHITECTURE),AMD64)
446 ifeq ($(ARCHITECTURE),IA64)
450 ifeq ($(USE_MULTI),define)
451 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
453 ifeq ($(USE_PERLIO),define)
454 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
456 ARCHNAME = MSWin32-$(ARCHITECTURE)
460 ifeq ($(USE_PERLIO),define)
461 BUILDOPT += -DUSE_PERLIO
464 ifeq ($(USE_ITHREADS),define)
465 ARCHNAME := $(ARCHNAME)-thread
468 ifneq ($(WIN64),define)
469 ifeq ($(USE_64_BIT_INT),define)
470 ARCHNAME := $(ARCHNAME)-64int
474 ifeq ($(USE_LONG_DOUBLE),define)
475 ARCHNAME := $(ARCHNAME)-ld
478 ifeq ($(USE_QUADMATH),define)
479 ARCHNAME := $(ARCHNAME)-quadmath
483 GCCVER := $(shell $(GCCBIN) -dumpversion)
484 GCCVER1 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('$(GCCBIN) -dumpversion') do echo %%i)
485 GCCVER2 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('$(GCCBIN) -dumpversion') do echo %%j)
486 GCCVER3 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('$(GCCBIN) -dumpversion') do echo %%k)
489 # Set the install location of the compiler headers/libraries.
490 # These are saved into $Config{incpath} and $Config{libpth}.
492 CCINCDIR := $(CCHOME)\$(GCCCROSS)\include
493 CCLIBDIR := $(CCHOME)\$(GCCCROSS)\lib
494 ARCHPREFIX := $(GCCCROSS)-
495 else ifeq ($(CCTYPE),GCC)
496 CCINCDIR := $(CCHOME)\include
497 CCLIBDIR := $(CCHOME)\lib;$(CCHOME)\$(GCCTARGET)\lib;$(CCHOME)\lib\gcc\$(GCCTARGET)\$(GCCVER)
500 CCINCDIR := $(CCHOME)\include
501 ifeq ($(CCTYPE),MSVC120)
502 ifeq ($(WIN64),define)
503 CCLIBDIR := $(CCHOME)\lib\amd64
505 CCLIBDIR := $(CCHOME)\lib
507 else ifeq ($(CCTYPE),MSVC140)
508 ifeq ($(WIN64),define)
509 CCLIBDIR := $(CCHOME)\lib\amd64
511 CCLIBDIR := $(CCHOME)\lib
514 ifeq ($(WIN64),define)
515 CCLIBDIR := $(CCHOME)\lib\x64
517 CCLIBDIR := $(CCHOME)\lib\x86
523 # Set DLL location for GCC compilers.
526 CCDLLDIR := $(CCHOME)\$(GCCCROSS)\lib
528 CCDLLDIR := $(CCHOME)\bin
532 ARCHDIR = ..\lib\$(ARCHNAME)
533 COREDIR = ..\lib\CORE
534 AUTODIR = ..\lib\auto
542 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
543 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
544 INST_LIB = $(INST_TOP)$(INST_VER)\lib
545 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
546 INST_COREDIR = $(INST_ARCHLIB)\CORE
547 INST_HTML = $(INST_TOP)$(INST_VER)\html
550 # Programs to compile, build .lib files and link
557 CC = $(ARCHPREFIX)gcc
558 LINK32 = $(ARCHPREFIX)g++
559 LIB32 = $(ARCHPREFIX)ar rc
560 IMPLIB = $(ARCHPREFIX)dlltool
561 RSC = $(ARCHPREFIX)windres
563 ifeq ($(USE_LONG_DOUBLE),define)
564 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
565 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
566 else ifeq ($(USE_MINGW_ANSI_STDIO),define)
567 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
568 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
572 # By default add -fwrapv, since we depend on 2's complement behaviour
573 # for signed numbers.
574 # See https://github.com/Perl/perl5/issues/13690
578 ifeq ($(GCCWRAPV),define)
580 MINIBUILDOPT += -fwrapv
591 INCLUDES = -I.\include -I. -I..
593 ifeq ($(WIN64),define)
596 LOCDEFS = -DPERLDLL -DPERL_CORE
599 LIBFILES = $(LIBC) -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool \
600 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 \
601 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
603 ifeq ($(USE_QUADMATH),define)
604 LIBFILES += -lquadmath
610 DEFINES += -DDEBUGGING
617 ifeq ($(USE_CPLUSPLUS),define)
618 EXTRACFLAGS += $(CXX_FLAG)
620 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
621 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(subst ;," -L",$(CCLIBDIR))"
627 BUILDOPT += -fno-strict-aliasing -mms-bitfields
628 MINIBUILDOPT += -fno-strict-aliasing
630 TESTPREPGCC = test-prep-gcc
636 # Loading DLLs on demand makes the test suite run in about 10% less time.
637 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
638 # which is rare to execute
639 ifneq ($(USE_NO_REGISTRY),undef)
640 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
643 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
644 #miniperl never does any registry lookups
645 MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
648 ifneq ($(__ICC),define)
655 LIB32 = $(LINK32) -lib
662 INCLUDES = -I.\include -I. -I..
663 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
664 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
665 LOCDEFS = -DPERLDLL -DPERL_CORE
667 EXTRACFLAGS = -nologo -GF -W3
669 ifeq ($(CCTYPE),MSVC120)
678 DEFINES += -DDEBUGGING
680 else ifeq ($(CFG),DebugSymbols)
684 else ifeq ($(CFG),DebugFull)
685 ifeq ($(CCTYPE),MSVC120)
692 DEFINES += -D_DEBUG -DDEBUGGING
696 # Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
697 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
698 OPTIMIZE = -O1 -Zi -GL
699 # we enable debug symbols in release builds also
700 LINK_DBG = -debug -opt:ref,icf -ltcg
701 # you may want to enable this if you want COFF symbols in the executables
702 # in addition to the PDB symbols. The default Dr. Watson that ships with
703 # Windows can use the former but not latter. The free WinDbg can be
704 # installed to get better stack traces from just the PDB symbols, so we
705 # avoid the bloat of COFF symbols by default.
706 #LINK_DBG += -debugtype:both
711 ifeq ($(WIN64),define)
713 OPTIMIZE += -fp:precise
716 # For now, silence warnings about "unsafe" CRT functions
717 # and POSIX CRT function names being deprecated.
718 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
720 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
721 ifneq ($(CCTYPE),MSVC120)
722 DEFINES += -D_WINSOCK_DEPRECATED_NO_WARNINGS
725 LIBBASEFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
726 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
727 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib \
728 odbc32.lib odbccp32.lib comctl32.lib
730 ifneq ($(CCTYPE),MSVC120)
731 ifeq ($(CFG),DebugFull)
732 LIBBASEFILES += msvcrtd.lib vcruntimed.lib
734 LIBBASEFILES += msvcrt.lib vcruntime.lib
738 # Avoid __intel_new_proc_init link error for libircmt.
739 # libmmd is /MD equivelent, other variants exist.
740 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
741 # and optimized C89 funcs
742 ifeq ($(__ICC),define)
743 LIBBASEFILES += libircmt.lib libmmd.lib
746 LIBFILES = $(LIBBASEFILES) $(LIBC)
748 ifeq ($(__ICC),define)
749 EXTRACFLAGS += -Qstd=c99
751 ifeq ($(USE_CPLUSPLUS),define)
752 EXTRACFLAGS += $(CXX_FLAG)
754 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
755 $(PCHFLAGS) $(OPTIMIZE)
756 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
757 -libpath:"$(INST_COREDIR)" \
758 -machine:$(PROCESSOR_ARCHITECTURE)
768 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
772 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
774 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
777 ifneq ($(CCTYPE),GCC)
778 ifeq ($(WIN64),define)
779 LINK_FLAGS += -subsystem:console,"5.02"
781 LINK_FLAGS += -subsystem:console,"5.01"
785 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
787 #################### do not edit below this line #######################
788 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
790 #prevent -j from reaching EUMM/make_ext.pl/"sub makes", Win32 EUMM not parallel
796 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
799 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) $<
802 $(CC) -c -I$(<D) $(CFLAGS_O) -E $< >$@
808 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
809 $(IMPLIB) --input-def $(*F).def --output-lib $(*F).a $@
813 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
815 $(RSC) -i.. -DINCLUDE_MANIFEST $<
821 #do not put $(MINIPERL) as a dep/prereq in a rule, instead put $(HAVEMINIPERL)
822 #$(MINIPERL) is not a buildable target, use "gmake mp" if you want to just build
824 MINIPERL = ..\miniperl.exe
825 HAVEMINIPERL = ..\lib\buildcustomize.pl
827 PERLEXE = ..\perl.exe
828 WPERLEXE = ..\wperl.exe
829 PERLEXESTATIC = ..\perl-static.exe
830 STATICDIR = .\static.tmp
831 GLOBEXE = ..\perlglob.exe
832 CONFIGPM = ..\lib\Config.pm
833 GENUUDMAP = ..\generate_uudmap.exe
834 ifeq ($(BUILD_STATIC),define)
837 ifeq ($(ALL_STATIC),define)
844 # Unicode data files generated by mktables
845 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
846 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
847 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
848 ..\lib\unicore\mktables.lst
850 # Directories of Unicode data files generated by mktables
851 UNIDATADIR1 = ..\lib\unicore\To
852 UNIDATADIR2 = ..\lib\unicore\lib
854 PERLEXE_MANIFEST= .\perlexe.manifest
855 PERLEXE_ICO = .\perlexe.ico
856 PERLEXE_RES = .\perlexe.res
859 # Nominate a target which causes extensions to be re-built
860 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
861 # on and really only the interface - i.e. the .def file used to export symbols
863 PERLDEP = $(PERLIMPLIB)
866 PL2BAT = bin\pl2bat.pl
888 ..\utils\zipdetails \
900 CFGSH_TMPL = config.gc
901 CFGH_TMPL = config_H.gc
902 PERLIMPLIB = $(COREDIR)\libperl535$(a)
903 PERLIMPLIBBASE = libperl535$(a)
904 PERLSTATICLIB = ..\libperl535s$(a)
909 CFGSH_TMPL = config.vc
910 CFGH_TMPL = config_H.vc
915 # makedef.pl must be updated if this changes, and this should normally
916 # only change when there is an incompatible revision of the public API.
917 PERLIMPLIB ?= $(COREDIR)\perl535$(a)
918 PERLIMPLIBBASE ?= perl535$(a)
919 PERLEXPLIB ?= $(COREDIR)\perl535.exp
920 PERLSTATICLIB ?= ..\perl535s$(a)
921 PERLDLL = ..\perl535.dll
922 PERLDLLBASE = perl535.dll
924 # don't let "gmake -n all" try to run "miniperl.exe make_ext.pl"
927 XCOPY = xcopy /f /r /i /d /y
928 RCOPY = xcopy /f /r /i /e /d /y
931 #first ones are arrange in compile time order for faster parallel building
932 #see #123867 for details
974 EXTRACORE_SRC += perllib.c
976 ifeq ($(PERL_MALLOC),define)
977 EXTRACORE_SRC += ..\malloc.c
980 EXTRACORE_SRC += ..\perlio.c
1023 .\include\dirent.h \
1025 .\include\sys\errno2.h \
1026 .\include\sys\socket.h \
1029 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
1031 UUDMAP_H = ..\uudmap.h
1032 BITCOUNT_H = ..\bitcount.h
1033 MG_DATA_H = ..\mg_data.h
1034 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
1036 HAVE_COREDIR = .coreheaders
1038 MICROCORE_OBJ = $(MICROCORE_SRC:.c=$(o))
1039 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
1040 WIN32_OBJ = $(WIN32_SRC:.c=$(o))
1042 MINICORE_OBJ = $(subst ..\,mini\,$(MICROCORE_OBJ)) \
1043 $(MINIDIR)\miniperlmain$(o) \
1044 $(MINIDIR)\perlio$(o)
1045 MINIWIN32_OBJ = $(subst .\,mini\,$(WIN32_OBJ))
1046 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
1047 DLL_OBJ = $(DYNALOADER)
1049 PERLDLL_OBJ = $(CORE_OBJ)
1050 PERLEXE_OBJ = perlmain$(o)
1051 PERLEXEST_OBJ = perlmainst$(o)
1053 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
1055 ifneq ($(USE_SETARGV),)
1056 SETARGV_OBJ = setargv$(o)
1059 ifeq ($(ALL_STATIC),define)
1060 # some exclusions, unfortunately, until fixed:
1061 # - MakeMaker isn't capable enough for SDBM_File (small bug)
1062 STATIC_EXT = * !SDBM_File
1063 NORMALIZE_STATIC = Normalize_static
1065 # specify static extensions here, for example:
1066 # (be sure to include Win32CORE to load Win32 on demand)
1067 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
1068 STATIC_EXT = Win32CORE
1069 NORMALIZE_DYN = Normalize_dyn
1072 DYNALOADER = ..\DynaLoader$(o)
1074 # vars must be separated by "\t+~\t+", since we're using the tempfile
1075 # version of config_sh.pl (we were overflowing someone's buffer by
1076 # trying to fit them all on the command line)
1079 "INST_TOP=$(INST_TOP)" \
1080 "INST_VER=$(INST_VER)" \
1081 "INST_ARCH=$(INST_ARCH)" \
1082 "archname=$(ARCHNAME)" \
1085 "ccflags=$(subst ",\",$(EXTRACFLAGS) $(DEFINES) $(BUILDOPT))" \
1086 "usecplusplus=$(USE_CPLUSPLUS)" \
1087 "cf_email=$(EMAIL)" \
1088 "d_mymalloc=$(PERL_MALLOC)" \
1089 "i_quadmath=$(I_QUADMATH)" \
1090 "libs=$(LIBFILES)" \
1091 "incpath=$(subst ",\",$(CCINCDIR))" \
1092 "libperl=$(subst ",\",$(PERLIMPLIBBASE))" \
1093 "libpth=$(subst ",\",$(CCLIBDIR);$(EXTRALIBDIRS))" \
1100 "static_ext=$(STATIC_EXT)" \
1101 "usethreads=$(USE_ITHREADS)" \
1102 "useithreads=$(USE_ITHREADS)" \
1103 "usemultiplicity=$(USE_MULTI)" \
1104 "useperlio=$(USE_PERLIO)" \
1105 "use64bitint=$(USE_64_BIT_INT)" \
1106 "uselongdouble=$(USE_LONG_DOUBLE)" \
1107 "usequadmath=$(USE_QUADMATH)" \
1108 "usesitecustomize=$(USE_SITECUST)" \
1109 "default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
1110 "LINK_FLAGS=$(subst ",\",$(LINK_FLAGS))"\
1111 "optimize=$(subst ",\",$(OPTIMIZE))" \
1112 "ARCHPREFIX=$(ARCHPREFIX)" \
1121 all : info rebasePE Extensions_nonxs $(PERLSTATIC)
1124 ifeq ($(CCTYPE),GCC)
1125 @echo # CCTYPE=$(CCTYPE)&& \
1126 echo # GCCBIN=$(GCCBIN)&& \
1127 echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)&& \
1128 echo # GCCTARGET=$(GCCTARGET)&& \
1129 echo # GCCCROSS=$(GCCCROSS)&& \
1130 echo # WIN64=$(WIN64)&& \
1131 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1132 echo # ARCHNAME=$(ARCHNAME)&& \
1133 echo # MAKE=$(PLMAKE)
1135 @echo # CCTYPE=$(CCTYPE)&& \
1136 echo # WIN64=$(WIN64)&& \
1137 echo # ARCHITECTURE=$(ARCHITECTURE)&& \
1138 echo # ARCHNAME=$(ARCHNAME)&& \
1139 echo # MAKE=$(PLMAKE)
1142 @echo Unable to detect gcc and/or architecture!
1147 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1149 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1151 reonly : ..\regnodes.h .\config.h ..\git_version.h $(GLOBEXE) $(HAVEMINIPERL)\
1152 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1155 static: $(PERLEXESTATIC)
1157 #----------------------------------------------------------------
1159 $(GLOBEXE) : perlglob.c
1160 ifeq ($(CCTYPE),GCC)
1161 $(LINK32) $(EXTRACFLAGS) $(OPTIMIZE) $(BLINK_FLAGS) -mconsole -o $@ perlglob.c $(LIBFILES)
1163 $(CC) $(EXTRACFLAGS) $(OPTIMIZE) $(PDBOUT) -Fe$@ perlglob.c -link $(BLINK_FLAGS) \
1164 setargv$(o) $(LIBFILES)
1167 ..\git_version.h : $(HAVEMINIPERL) ..\make_patchnum.pl
1168 $(MINIPERL) -I..\lib ..\make_patchnum.pl
1170 # make sure that we recompile perl.c if the git version changes
1171 ..\perl$(o) : ..\git_version.h
1173 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(HAVEMINIPERL)
1174 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1176 # This target is for when changes to the main config.sh happen.
1177 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1178 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
1179 # this target to regenerate config_H.gc.
1181 $(MINIPERL) -I..\lib config_sh.PL --prebuilt $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
1182 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1183 -del /f $(CFGH_TMPL)
1184 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1185 rename config.h $(CFGH_TMPL)
1187 $(CONFIGPM): ..\config.sh config_h.PL
1188 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1189 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1191 .\config.h : $(CONFIGPM)
1193 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1194 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
1195 ifeq ($(CCTYPE),GCC)
1196 $(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
1198 $(LINK32) -out:$(MINIPERL) $(BLINK_FLAGS) \
1199 $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
1202 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1204 #convinence target, get a working miniperl
1207 $(MINIDIR)\.exists : $(CFGH_TMPL)
1208 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1210 # Copy the template config.h and set configurables at the end of it
1211 # as per the options chosen and compiler used.
1212 # Note: This config.h is only used to build miniperl.exe anyway, but
1213 # it's as well to have its options correct to be sure that it builds
1214 # and so that it's "-V" options are correct for use by makedef.pl. The
1215 # real config.h used to build perl.exe is generated from the top-level
1216 # config_h.SH by config_h.PL (run by miniperl.exe).
1218 # MINIDIR generates config.h so miniperl.exe is not rebuilt when the 2nd
1219 # config.h is generated in CONFIGPM target, see also the comments for $(MINI_OBJ).
1220 copy $(CFGH_TMPL) config.h
1222 echo #ifndef _config_h_footer_&& \
1223 echo #define _config_h_footer_&& \
1224 echo #undef PTRSIZE&& \
1225 echo #undef SSize_t&& \
1226 echo #undef HAS_ATOLL&& \
1227 echo #undef HAS_STRTOLL&& \
1228 echo #undef HAS_STRTOULL&& \
1229 echo #undef Size_t_size&& \
1230 echo #undef IVTYPE&& \
1231 echo #undef UVTYPE&& \
1232 echo #undef IVSIZE&& \
1233 echo #undef UVSIZE&& \
1234 echo #undef NV_PRESERVES_UV&& \
1235 echo #undef NV_PRESERVES_UV_BITS&& \
1236 echo #undef IVdf&& \
1237 echo #undef UVuf&& \
1238 echo #undef UVof&& \
1239 echo #undef UVxf&& \
1240 echo #undef UVXf&& \
1241 echo #undef USE_64_BIT_INT&& \
1242 echo #undef Gconvert&& \
1243 echo #undef HAS_FREXPL&& \
1244 echo #undef HAS_ISNANL&& \
1245 echo #undef HAS_MODFL&& \
1246 echo #undef HAS_MODFL_PROTO&& \
1247 echo #undef HAS_SQRTL&& \
1248 echo #undef HAS_STRTOLD&& \
1249 echo #undef PERL_PRIfldbl&& \
1250 echo #undef PERL_PRIgldbl&& \
1251 echo #undef PERL_PRIeldbl&& \
1252 echo #undef PERL_SCNfldbl&& \
1253 echo #undef NVTYPE&& \
1254 echo #undef NVSIZE&& \
1255 echo #undef LONG_DOUBLESIZE&& \
1256 echo #undef NV_OVERFLOWS_INTEGERS_AT&& \
1257 echo #undef NVef&& \
1258 echo #undef NVff&& \
1259 echo #undef NVgf&& \
1260 echo #undef USE_LONG_DOUBLE&& \
1261 echo #undef I_QUADMATH&& \
1262 echo #undef USE_QUADMATH&& \
1263 echo #undef USE_CPLUSPLUS)>> config.h
1264 ifneq ($(CCTYPE),MSVC120)
1265 @(echo #undef FILE_ptr&& \
1266 echo #undef FILE_cnt&& \
1267 echo #undef FILE_base&& \
1268 echo #undef FILE_bufsiz&& \
1269 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1270 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1271 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1272 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1273 echo #define I_STDBOOL)>> config.h
1275 ifeq ($(WIN64),define)
1276 ifeq ($(CCTYPE),GCC)
1277 @(echo #define LONG_DOUBLESIZE ^16)>> config.h
1279 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1281 @(echo #define PTRSIZE ^8&& \
1282 echo #define SSize_t $(INT64)&& \
1283 echo #define HAS_ATOLL&& \
1284 echo #define HAS_STRTOLL&& \
1285 echo #define HAS_STRTOULL&& \
1286 echo #define Size_t_size ^8)>> config.h
1288 ifeq ($(CCTYPE),GCC)
1289 @(echo #define LONG_DOUBLESIZE ^12)>> config.h
1291 @(echo #define LONG_DOUBLESIZE ^8)>> config.h
1293 @(echo #define PTRSIZE ^4&& \
1294 echo #define SSize_t int&& \
1295 echo #undef HAS_ATOLL&& \
1296 echo #undef HAS_STRTOLL&& \
1297 echo #undef HAS_STRTOULL&& \
1298 echo #define Size_t_size ^4)>> config.h
1300 ifeq ($(USE_64_BIT_INT),define)
1301 @(echo #define IVTYPE $(INT64)&& \
1302 echo #define UVTYPE unsigned $(INT64)&& \
1303 echo #define IVSIZE ^8&& \
1304 echo #define UVSIZE ^8)>> config.h
1305 ifeq ($(USE_LONG_DOUBLE),define)
1306 @(echo #define NV_PRESERVES_UV&& \
1307 echo #define NV_PRESERVES_UV_BITS 64)>> config.h
1308 else ifeq ($(USE_QUADMATH),define)
1309 @(echo #define NV_PRESERVES_UV&& \
1310 echo #define NV_PRESERVES_UV_BITS 64)>> config.h
1312 @(echo #undef NV_PRESERVES_UV&& \
1313 echo #define NV_PRESERVES_UV_BITS 53)>> config.h
1315 @(echo #define IVdf "I64d"&& \
1316 echo #define UVuf "I64u"&& \
1317 echo #define UVof "I64o"&& \
1318 echo #define UVxf "I64x"&& \
1319 echo #define UVXf "I64X"&& \
1320 echo #define USE_64_BIT_INT)>> config.h
1322 @(echo #define IVTYPE long&& \
1323 echo #define UVTYPE unsigned long&& \
1324 echo #define IVSIZE ^4&& \
1325 echo #define UVSIZE ^4&& \
1326 echo #define NV_PRESERVES_UV&& \
1327 echo #define NV_PRESERVES_UV_BITS 32&& \
1328 echo #define IVdf "ld"&& \
1329 echo #define UVuf "lu"&& \
1330 echo #define UVof "lo"&& \
1331 echo #define UVxf "lx"&& \
1332 echo #define UVXf "lX"&& \
1333 echo #undef USE_64_BIT_INT)>> config.h
1335 ifeq ($(USE_LONG_DOUBLE),define)
1336 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*""Lg",^(n^),^(x^)^)&& \
1337 echo #define HAS_FREXPL&& \
1338 echo #define HAS_ISNANL&& \
1339 echo #define HAS_MODFL&& \
1340 echo #define HAS_MODFL_PROTO&& \
1341 echo #define HAS_SQRTL&& \
1342 echo #define HAS_STRTOLD&& \
1343 echo #define PERL_PRIfldbl "Lf"&& \
1344 echo #define PERL_PRIgldbl "Lg"&& \
1345 echo #define PERL_PRIeldbl "Le"&& \
1346 echo #define PERL_SCNfldbl "Lf"&& \
1347 echo #define NVTYPE long double&& \
1348 echo #define NVSIZE LONG_DOUBLESIZE&& \
1349 echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0*2.0&& \
1350 echo #define NVef "Le"&& \
1351 echo #define NVff "Lf"&& \
1352 echo #define NVgf "Lg"&& \
1353 echo #undef I_QUADMATH&& \
1354 echo #undef USE_QUADMATH&& \
1355 echo #define USE_LONG_DOUBLE)>> config.h
1356 else ifeq ($(USE_QUADMATH),define)
1357 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*""Lg",^(n^),^(x^)^)&& \
1358 echo #define HAS_FREXPL&& \
1359 echo #define HAS_ISNANL&& \
1360 echo #define HAS_MODFL&& \
1361 echo #define HAS_MODFL_PROTO&& \
1362 echo #define HAS_SQRTL&& \
1363 echo #define HAS_STRTOLD&& \
1364 echo #define PERL_PRIfldbl "Lf"&& \
1365 echo #define PERL_PRIgldbl "Lg"&& \
1366 echo #define PERL_PRIeldbl "Le"&& \
1367 echo #define PERL_SCNfldbl "Lf"&& \
1368 echo #define NVTYPE __float128&& \
1369 echo #define NVSIZE 16&& \
1370 echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*256.0*2.0&& \
1371 echo #define NVef "Qe"&& \
1372 echo #define NVff "Qf"&& \
1373 echo #define NVgf "Qg"&& \
1374 echo #undef USE_LONG_DOUBLE&& \
1375 echo #define I_QUADMATH&& \
1376 echo #define USE_QUADMATH)>> config.h
1378 @(echo #define Gconvert^(x,n,t,b^) sprintf^(^(b^),"%%.*g",^(n^),^(x^)^)&& \
1379 echo #undef HAS_FREXPL&& \
1380 echo #undef HAS_ISNANL&& \
1381 echo #undef HAS_MODFL&& \
1382 echo #undef HAS_MODFL_PROTO&& \
1383 echo #undef HAS_SQRTL&& \
1384 echo #undef HAS_STRTOLD&& \
1385 echo #undef PERL_PRIfldbl&& \
1386 echo #undef PERL_PRIgldbl&& \
1387 echo #undef PERL_PRIeldbl&& \
1388 echo #undef PERL_SCNfldbl&& \
1389 echo #define NVTYPE double&& \
1390 echo #define NVSIZE ^8&& \
1391 echo #define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0&& \
1392 echo #define NVef "e"&& \
1393 echo #define NVff "f"&& \
1394 echo #define NVgf "g"&& \
1395 echo #undef I_QUADMATH&& \
1396 echo #undef USE_QUADMATH&& \
1397 echo #undef USE_LONG_DOUBLE)>> config.h
1399 ifeq ($(USE_CPLUSPLUS),define)
1400 @(echo #define USE_CPLUSPLUS&& \
1401 echo #endif)>> config.h
1403 @(echo #undef USE_CPLUSPLUS&& \
1404 echo #endif)>> config.h
1406 #separate line since this is sentinal that this target is done
1407 @rem. > $(MINIDIR)\.exists
1409 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1410 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) ..\$(*F).c
1412 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1413 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(PDBOUT) $(*F).c
1415 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1416 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s
1417 # unless the .IF is true), so instead we use a .ELSE with the default.
1418 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1420 perllib$(o) : perllib.c perllibst.h .\perlhost.h .\vdir.h .\vmem.h
1421 ifeq ($(USE_IMP_SYS),define)
1422 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1424 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) perllib.c
1427 # 1. we don't want to rebuild miniperl.exe when config.h changes
1428 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1429 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1430 $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1432 $(WIN32_OBJ) : $(CORE_H)
1434 $(CORE_OBJ) : $(CORE_H)
1436 $(DLL_OBJ) : $(CORE_H)
1439 perllibst.h : $(HAVEMINIPERL) $(CONFIGPM) create_perllibst_h.pl
1440 $(MINIPERL) -I..\lib create_perllibst_h.pl
1442 perldll.def : $(HAVEMINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl
1443 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1444 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1446 $(PERLEXPLIB) : $(PERLIMPLIB)
1448 $(PERLIMPLIB) : perldll.def
1449 ifeq ($(CCTYPE),GCC)
1450 $(IMPLIB) -k -d perldll.def -D $(PERLDLLBASE) -l $(PERLIMPLIB) -e $(PERLEXPLIB)
1452 lib -def:perldll.def -machine:$(ARCHITECTURE) /OUT:$(PERLIMPLIB)
1455 $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1456 ifeq ($(CCTYPE),GCC)
1457 $(LINK32) -shared -o $@ $(BLINK_FLAGS) \
1458 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) $(PERLEXPLIB)
1460 $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \
1461 @Extensions_static \
1462 $(DELAYLOAD) $(LIBFILES) \
1463 $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)
1466 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1467 ifeq ($(CCTYPE),GCC)
1468 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1469 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1470 for %%i in ($(shell type Extensions_static)) do \
1471 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1472 $(ARCHPREFIX)ar x ..\%%i && \
1473 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1474 cd .. && rmdir /s /q $(STATICDIR)
1476 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1479 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1481 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1483 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1485 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1487 $(BITCOUNT_H) : $(GENUUDMAP)
1488 $(GENUUDMAP) $(GENERATED_HEADERS)
1490 $(GENUUDMAP) : ..\mg_raw.h
1491 ifeq ($(CCTYPE),GCC)
1492 $(LINK32) $(CFLAGS_O) -o..\generate_uudmap.exe ..\generate_uudmap.c \
1493 $(BLINK_FLAGS) $(LIBFILES)
1495 $(CC) $(CFLAGS_O) $(PDBOUT) -Fe..\generate_uudmap.exe ..\generate_uudmap.c -link $(LIBFILES) $(BLINK_FLAGS)
1500 MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
1501 $(MINIPERL) -I..\lib ..\mkppport
1503 # also known as $(HAVE_COREDIR)
1504 .coreheaders : $(CORE_H)
1505 $(XCOPY) *.h $(COREDIR)\\*.*
1506 $(RCOPY) include $(COREDIR)\\*.*
1507 $(XCOPY) ..\\*.h $(COREDIR)\\*.*
1510 perlmain$(o) : runperl.c $(CONFIGPM)
1511 $(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1513 perlmainst$(o) : runperl.c $(CONFIGPM)
1514 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $(PDBOUT) -c runperl.c
1516 $(PERLEXE): $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB)
1517 ifeq ($(CCTYPE),GCC)
1518 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1519 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1521 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1522 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1524 copy $(PERLEXE) $(WPERLEXE)
1525 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1527 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1528 ifeq ($(CCTYPE),GCC)
1529 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1530 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1532 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1533 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1536 #-------------------------------------------------------------------------------
1537 # There's no direct way to mark a dependency on
1538 # DynaLoader.pm, so this will have to do
1540 #most of deps of this target are in DYNALOADER and therefore omitted here
1541 Extensions : $(PERLDEP) $(DYNALOADER) Extension_lib $(GLOBEXE) MakePPPort
1542 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
1544 Normalize_static : $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) $(UNIDATAFILES)
1545 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static +Unicode/Normalize
1547 Normalize_dyn : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
1548 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +Unicode/Normalize
1550 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
1551 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1553 Exts_static_general : ..\make_ext.pl $(CONFIGPM) Extension_lib $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
1554 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static !Unicode/Normalize
1556 Extensions_static : list_static_libs.pl Exts_static_general $(NORMALIZE_STATIC)
1557 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1559 Extensions_nonxs : ..\make_ext.pl ..\pod\perlfunc.pod $(CONFIGPM) $(GLOBEXE)
1560 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs !libs
1562 Extension_lib : ..\make_ext.pl $(CONFIGPM)
1563 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) lib
1565 #lib must be built, it can't be buildcustomize.pl-ed, and is required for XS building
1566 $(DYNALOADER) : ..\make_ext.pl $(CONFIGPM) $(HAVE_COREDIR)
1567 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(EXTDIR) --dir=$(DISTDIR) --dynaloader
1570 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1572 Extensions_realclean :
1573 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1575 # all PE files need to be built by the time this target runs, PP files can still
1576 # be running in parallel like UNIDATAFILES, this target a placeholder for the
1578 ifeq ($(PERLSTATIC),static)
1579 rebasePE : Extensions $(PERLDLL) $(PERLEXE) $(PERLEXESTATIC)
1581 rebasePE : Extensions $(PERLDLL) $(NORMALIZE_DYN) $(PERLEXE)
1585 #-------------------------------------------------------------------------------
1587 doc: $(PERLEXE) $(PERLDLL) ..\pod\perltoc.pod
1588 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1589 --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
1592 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1593 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1595 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1596 # so please check that script before making structural changes here
1597 utils: $(HAVEMINIPERL) ..\utils\Makefile
1598 cd ..\utils && $(PLMAKE) PERL=$(MINIPERL)
1599 copy ..\README.aix ..\pod\perlaix.pod
1600 copy ..\README.amiga ..\pod\perlamiga.pod
1601 copy ..\README.android ..\pod\perlandroid.pod
1602 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1603 copy ..\README.cn ..\pod\perlcn.pod
1604 copy ..\README.cygwin ..\pod\perlcygwin.pod
1605 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1606 copy ..\README.haiku ..\pod\perlhaiku.pod
1607 copy ..\README.hpux ..\pod\perlhpux.pod
1608 copy ..\README.hurd ..\pod\perlhurd.pod
1609 copy ..\README.irix ..\pod\perlirix.pod
1610 copy ..\README.jp ..\pod\perljp.pod
1611 copy ..\README.ko ..\pod\perlko.pod
1612 copy ..\README.linux ..\pod\perllinux.pod
1613 copy ..\README.macos ..\pod\perlmacos.pod
1614 copy ..\README.macosx ..\pod\perlmacosx.pod
1615 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1616 copy ..\README.os2 ..\pod\perlos2.pod
1617 copy ..\README.os390 ..\pod\perlos390.pod
1618 copy ..\README.os400 ..\pod\perlos400.pod
1619 copy ..\README.plan9 ..\pod\perlplan9.pod
1620 copy ..\README.qnx ..\pod\perlqnx.pod
1621 copy ..\README.riscos ..\pod\perlriscos.pod
1622 copy ..\README.solaris ..\pod\perlsolaris.pod
1623 copy ..\README.synology ..\pod\perlsynology.pod
1624 copy ..\README.tru64 ..\pod\perltru64.pod
1625 copy ..\README.tw ..\pod\perltw.pod
1626 copy ..\README.vos ..\pod\perlvos.pod
1627 copy ..\README.win32 ..\pod\perlwin32.pod
1628 copy ..\pod\perldelta.pod ..\pod\perl5358delta.pod
1629 $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS)
1630 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1631 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1633 ..\pod\perltoc.pod: $(PERLEXE) $(PERLDLL) Extensions Extensions_nonxs $(NORMALIZE_DYN) utils
1634 $(PERLEXE) -f ..\pod\buildtoc -q
1636 # Note that the pod cleanup in this next section is parsed (and regenerated
1637 # by pod/buildtoc so please check that script before making changes here
1639 distclean: realclean
1640 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1641 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1642 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1643 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1644 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1645 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1646 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1647 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1648 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1649 -del /f $(LIBDIR)\File\Glob.pm
1650 -del /f $(LIBDIR)\Sys\Hostname.pm
1651 -del /f $(LIBDIR)\Time\HiRes.pm
1652 -del /f $(LIBDIR)\Unicode\Normalize.pm
1653 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1654 -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
1655 -del /f $(LIBDIR)\Win32.pm
1656 -del /f $(LIBDIR)\Win32CORE.pm
1657 -del /f $(LIBDIR)\Win32API\File.pm
1658 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1659 -del /f $(LIBDIR)\buildcustomize.pl
1660 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1662 -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
1663 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1664 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1665 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1666 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1667 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1668 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1669 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1670 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1671 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1672 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1673 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1674 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1675 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1676 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1677 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1678 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1679 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1680 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1681 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1682 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1683 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1684 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1685 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1686 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1687 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1688 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1689 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1690 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1691 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1692 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1693 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1694 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1695 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1696 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1697 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1698 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1699 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1700 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1701 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1702 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1703 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1704 -if exist $(LIBDIR)\Pod\Html rmdir /s /q $(LIBDIR)\Pod\Html
1705 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1706 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1707 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1708 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1709 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1710 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1711 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1712 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1713 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1714 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1715 -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
1716 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1717 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1718 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1719 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1720 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1721 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1722 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1723 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1724 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1725 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1726 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1727 perl5358delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1728 perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
1729 perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
1730 perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
1731 perlmacos.pod perlmacosx.pod perlmodlib.pod perlopenbsd.pod \
1732 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1733 perlqnx.pod perlriscos.pod perlsolaris.pod perlsynology.pod \
1734 perltoc.pod perltru64.pod perltw.pod perluniprops.pod \
1735 perlvos.pod perlwin32.pod
1736 -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
1737 perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
1738 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1739 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1742 -del /f ..\lib\Config_git.pl
1745 -del /f $(PERLEXE_RES) perl.base
1746 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1747 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1748 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1749 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1750 -del /s ..\utils\Makefile
1751 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1752 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1753 -if exist pod2htmd.tmp del pod2htmd.tmp
1754 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1755 -del /f ..\t\test_state
1757 install : all installbare installhtml
1759 installbare : utils ..\pod\perltoc.pod
1760 $(PERLEXE) ..\installperl
1761 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\$(NULL)
1762 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
1763 $(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
1764 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
1765 $(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
1768 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
1770 inst_lib : $(CONFIGPM)
1771 $(RCOPY) ..\lib $(INST_LIB)\$(NULL)
1773 $(UNIDATAFILES) : ..\pod\perluniprops.pod
1775 ..\pod\perluniprops.pod: ..\lib\unicore\mktables $(CONFIGPM)
1776 $(MINIPERL) -I..\lib ..\lib\unicore\mktables -C ..\lib\unicore -P ..\pod -maketest -makelist -p
1778 minitest : $(HAVEMINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1779 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1780 if exist ..\t\perl.exe del /f ..\t\perl.exe
1781 rename ..\t\miniperl.exe perl.exe
1782 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1783 attrib -r "..\t\*.*"
1785 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1787 test-prep : all utils ..\pod\perltoc.pod $(TESTPREPGCC)
1788 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1789 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1790 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1791 # If building with gcc versions 4.x.x or greater, then
1792 # the GCC helper DLL will also need copied to the test directory.
1793 # The name of the dll can change, depending upon which vendor has supplied
1794 # your compiler, and upon the values of "x".
1795 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1796 # Without this copying, the op/taint.t test script will fail.
1798 ifeq ($(CCTYPE),GCC)
1801 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1802 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1803 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1804 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1805 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1806 if exist $(CCDLLDIR)\libquadmath-0.dll $(XCOPY) $(CCDLLDIR)\libquadmath-0.dll ..\t\$(NULL)
1811 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1812 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1814 test_porting : test-prep
1815 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1816 cd ..\t && perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1818 test-reonly : reonly utils
1819 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1820 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1821 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1822 cd ..\t && perl.exe harness $(OPT) -re \bpat\\/ $(EXTRA)
1827 test-notty : test-prep
1828 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1829 set PERL_SKIP_TTY_TEST=1 && \
1830 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1833 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1834 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1835 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1836 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1837 cd ..\t && perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1840 -@erase miniperlmain$(o)
1842 -@erase perlglob$(o)
1843 -@erase perlmain$(o)
1844 -@erase perlmainst$(o)
1846 -@erase /f ..\git_version.h
1850 -@erase $(PERLEXESTATIC)
1851 -@erase $(PERLSTATICLIB)
1854 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1855 -@erase .coreheaders
1856 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1857 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1858 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1859 -@erase $(UNIDATAFILES)
1860 -@erase $(WIN32_OBJ)
1862 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1863 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1865 -@erase *.pdb ..\*.pdb
1866 -@erase Extensions_static
1868 clean : Extensions_clean _clean
1870 realclean : Extensions_realclean _clean
1872 # Handy way to run perlbug -ok without having to install and run the
1873 # installed perlbug. We don't re-run the tests here - we trust the user.
1874 # Please *don't* use this unless all tests pass.
1875 # If you want to report test failures, use "gmake nok" instead.
1876 ok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1877 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1879 okfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1880 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1882 nok: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1883 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1885 nokfile: utils $(PERLEXE) $(PERLDLL) Extensions_nonxs Extensions
1886 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok