2 # Makefile to build perl on Windows using Microsoft NMAKE.
4 # Microsoft Visual C++ 12.0 or later
6 # This is set up to build a perl.exe that runs off a shared library
7 # (perl537.dll). Also makes individual DLLs for the XS extensions.
11 ## Make sure you read README.win32 *before* you mess with anything here!
15 ## Build configuration. Edit the values below to suit your needs.
19 # Set these to wherever you want "nmake install" to put your
23 INST_TOP = $(INST_DRV)\perl
26 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
27 # on a 64-bit version of Windows.
32 # Comment this out if you DON'T want your perl installation to be versioned.
33 # This means that the new installation will overwrite any files from the
34 # old installation at the same INST_TOP location. Leaving it enabled is
35 # the safest route, as perl adds the extra version directory to all the
36 # locations it installs files to. If you disable it, an alternative
37 # versioned installation can be obtained by setting INST_TOP above to a
38 # path that includes an arbitrary version string.
43 # Comment this out if you DON'T want your perl installation to have
44 # architecture specific components. This means that architecture-
45 # specific files will be installed along with the architecture-neutral
46 # files. Leaving it enabled is safer and more flexible, in case you
47 # want to build multiple flavors of perl and install them together in
48 # the same location. Commenting it out gives you a simpler
49 # installation that is easier to understand for beginners.
51 #INST_ARCH = \$(ARCHNAME)
54 # Uncomment this if you want perl to run
55 # $Config{sitelibexp}\sitecustomize.pl
56 # before anything else. This script can then be set up, for example,
57 # to add additional entries to @INC.
59 #USE_SITECUST = define
62 # uncomment to enable multiple interpreters. This is needed for fork()
63 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
64 # and USE_ITHREADS below.
69 # Interpreter cloning/threads; now reasonably complete.
70 # This should be enabled to get the fork() emulation. This needs (and
71 # will auto-enable) USE_MULTI above.
76 # uncomment to enable the implicit "host" layer for all system calls
77 # made by perl. This is also needed to get fork(). This needs (and
78 # will auto-enable) USE_MULTI above.
83 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
84 # (If you're building a 64-bit perl then you will have 64-bit integers whether
85 # or not this is uncommented.)
87 #USE_64_BIT_INT = define
90 # Comment this out if you want the legacy default behavior of including '.' at
93 DEFAULT_INC_EXCLUDES_DOT = define
96 # Uncomment this if you want to disable looking up values from
97 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
100 #USE_NO_REGISTRY = define
103 # uncomment exactly one of the following
105 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
107 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
109 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
111 # Visual C++ 2019 (aka Visual C++ 14.2) (full version or Community Edition)
113 # Visual C++ 2022 (aka Visual C++ 14.3) (full version or Community Edition)
117 # If you are using Intel C++ Compiler uncomment this
122 # Uncomment this if you want to build everything in C++ mode
124 #USE_CPLUSPLUS = define
127 # uncomment next line if you want debug version of perl (big/slow)
128 # If not enabled, we automatically try to use maximum optimization
129 # with all compilers that are known to have a working optimizer.
131 # You can also set CFG = DebugSymbols for a slightly smaller/faster
132 # debug build without the special debugging code in perl which is
133 # enabled via -DDEBUGGING;
135 # or you can set CFG = DebugFull for an even fuller (bigger/slower)
136 # debug build using the debug version of the CRT, and enabling VC++
137 # debug features such as extra assertions and invalid parameter warnings
138 # in perl and CRT code via -D_DEBUG. (Note that the invalid parameter
139 # handler does get triggered from time to time in this configuration,
140 # which causes warnings to be printed on STDERR, which in turn causes a
141 # few tests to fail.)
146 # uncomment to enable linking with setargv.obj under the Visual C
147 # compiler. Setting this options enables perl to expand wildcards in
148 # arguments, but it may be harder to use alternate methods like
149 # File::DosGlob that are more powerful. This option is supported only with
152 #USE_SETARGV = define
155 # set this if you wish to use perl's malloc
156 # WARNING: Turning this on/off WILL break binary compatibility with extensions
157 # you may have compiled with/without it. Be prepared to recompile all
158 # extensions if you change the default. Currently, this cannot be enabled
159 # if you ask for USE_IMP_SYS above.
161 #PERL_MALLOC = define
164 # set this to enable debugging mstats
165 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
166 # be enabled without PERL_MALLOC as well.
168 #DEBUG_MSTATS = define
171 # set this to additionally provide a statically linked perl-static.exe.
172 # Note that dynamic loading will not work with this perl, so you must
173 # include required modules statically using the STATIC_EXT or ALL_STATIC
174 # variables below. A static library perl537s.lib will also be created.
175 # Ordinary perl.exe is not affected by this option.
177 #BUILD_STATIC = define
180 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
181 # extension get statically built.
182 # This will result in a very large perl executable, but the main purpose
183 # is to have proper linking set so as to be able to create miscellaneous
184 # executables with different built-in extensions.
189 # set the install location of the compiler
190 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
192 # Versions of Visual C++ up to VC++ 14.0 define $(VCINSTALLDIR), but from
193 # VC++ 14.1 we need the subfolder given by $(VCToolsInstallDir).
195 !IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140"
196 CCHOME = $(VCINSTALLDIR)
198 CCHOME = $(VCTOOLSINSTALLDIR)
202 # Additional compiler flags can be specified here.
204 BUILDOPT = $(BUILDOPTEXTRA)
207 # This should normally be disabled. Enabling it will disable the File::Glob
208 # implementation of CORE::glob.
210 #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
213 # Perl needs to read scripts in text mode so that the DATA filehandle
214 # works correctly with seek() and tell(), or around auto-flushes of
215 # all filehandles (e.g. by system(), backticks, fork(), etc).
217 # The current version on the ByteLoader module on CPAN however only
218 # works if scripts are read in binary mode. But before you disable text
219 # mode script reading (and break some DATA filehandle functionality)
220 # please check first if an updated ByteLoader isn't available on CPAN.
222 BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
225 # specify semicolon-separated list of extra directories that modules will
226 # look for libraries (spaces in path names need not be quoted)
231 # set this to your email address (perl will guess a value from
232 # your loginname and your hostname, which may not be right)
237 ## Build configuration ends.
240 ##################### CHANGE THESE ONLY IF YOU MUST #####################
242 !IF "$(USE_IMP_SYS)" == "define"
247 !IF "$(PERL_MALLOC)" == ""
252 !IF "$(DEBUG_MSTATS)" == ""
256 !IF "$(DEBUG_MSTATS)" == "define"
257 BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
260 !IF "$(USE_SITECUST)" == ""
264 !IF "$(USE_MULTI)" == ""
268 !IF "$(USE_ITHREADS)" == ""
272 !IF "$(USE_IMP_SYS)" == ""
276 !IF "$(USE_64_BIT_INT)" == ""
277 USE_64_BIT_INT = undef
280 !IF "$(DEFAULT_INC_EXCLUDES_DOT)" == ""
281 DEFAULT_INC_EXCLUDES_DOT = undef
284 !IF "$(USE_NO_REGISTRY)" == ""
285 USE_NO_REGISTRY = undef
288 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
292 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
296 !IF "$(USE_SITECUST)" == "define"
297 BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE
300 !IF "$(USE_MULTI)" != "undef"
301 BUILDOPT = $(BUILDOPT) -DMULTIPLICITY
304 !IF "$(USE_IMP_SYS)" != "undef"
305 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
308 !IF "$(USE_NO_REGISTRY)" != "undef"
309 BUILDOPT = $(BUILDOPT) -DWIN32_NO_REGISTRY
312 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
313 PROCESSOR_ARCHITECTURE = x86
317 # When we are running from a 32bit cmd.exe on AMD64 then
318 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
320 ! IF "$(PROCESSOR_ARCHITEW6432)" != ""
321 PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
323 ! ELSEIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64" || "$(PROCESSOR_ARCHITECTURE)" == "ARM64"
330 !IF "$(WIN64)" == "define"
331 USE_64_BIT_INT = define
334 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
336 !IF "$(ARCHITECTURE)" == "AMD64"
338 !ELSEIF "$(ARCHITECTURE)" == "IA64"
340 !ELSEIF "$(ARCHITECTURE)" == "ARM64"
344 !IF "$(USE_MULTI)" == "define"
345 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
347 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
350 !IF "$(USE_ITHREADS)" == "define"
351 ARCHNAME = $(ARCHNAME)-thread
354 !IF "$(WIN64)" != "define" && "$(USE_64_BIT_INT)" == "define"
355 ARCHNAME = $(ARCHNAME)-64int
358 # Loading DLLs on demand makes the test suite run in about 10% less time.
359 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
360 # which is rare to execute
361 !IF "$(USE_NO_REGISTRY)" != "undef"
362 DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
365 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
366 #miniperl never does any registry lookups
367 MINIDELAYLOAD = -DELAYLOAD:advapi32.dll
370 # Set the install location of the compiler headers/libraries.
371 # These are saved into $Config{incpath} and $Config{libpth}.
372 CCINCDIR = $(CCHOME)\include
373 !IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140"
374 ! IF "$(WIN64)" == "define"
375 CCLIBDIR = $(CCHOME)\lib\amd64
377 CCLIBDIR = $(CCHOME)\lib
380 ! IF "$(ARCHITECTURE)" == "arm64"
381 CCLIBDIR = $(CCHOME)\lib\arm64
382 ! ELSEIF "$(WIN64)" == "define"
383 CCLIBDIR = $(CCHOME)\lib\x64
385 CCLIBDIR = $(CCHOME)\lib\x86
389 ARCHDIR = ..\lib\$(ARCHNAME)
390 COREDIR = ..\lib\CORE
391 AUTODIR = ..\lib\auto
399 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
400 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
401 INST_LIB = $(INST_TOP)$(INST_VER)\lib
402 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
403 INST_COREDIR = $(INST_ARCHLIB)\CORE
404 INST_HTML = $(INST_TOP)$(INST_VER)\html
407 # Programs to compile, build .lib files and link
410 # Poison the recipe if no CCTYPE is set, and delete mini\.exists so everything
411 # is rebuilt next time to avoid reusing a mini config.h written with no sane CC
413 !IF "$(CCTYPE)" == ""
414 CC = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
415 LINK32 = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
416 !ELSEIF "$(__ICC)" != "define"
423 LIB32 = $(LINK32) -lib
430 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
431 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
432 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
433 LOCDEFS = -DPERLDLL -DPERL_CORE
435 EXTRACFLAGS = -nologo -GF -W3
437 !IF "$(CCTYPE)" == "MSVC120"
443 !IF "$(CFG)" == "Debug"
446 DEFINES = $(DEFINES) -DDEBUGGING
447 EXTRACFLAGS = $(EXTRACFLAGS) -MD
448 !ELSEIF "$(CFG)" == "DebugSymbols"
451 EXTRACFLAGS = $(EXTRACFLAGS) -MD
452 !ELSEIF "$(CFG)" == "DebugFull"
453 ! IF "$(CCTYPE)" == "MSVC120"
460 DEFINES = $(DEFINES) -D_DEBUG -DDEBUGGING
461 EXTRACFLAGS = $(EXTRACFLAGS) -MDd
463 # Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
464 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
465 OPTIMIZE = -O1 -Zi -GL
466 # we enable debug symbols in release builds also
467 LINK_DBG = -debug -opt:ref,icf -ltcg
468 # you may want to enable this if you want COFF symbols in the executables
469 # in addition to the PDB symbols. The default Dr. Watson that ships with
470 # Windows can use the former but not latter. The free WinDbg can be
471 # installed to get better stack traces from just the PDB symbols, so we
472 # avoid the bloat of COFF symbols by default.
473 #LINK_DBG = $(LINK_DBG) -debugtype:both
475 EXTRACFLAGS = $(EXTRACFLAGS) -MD
478 !IF "$(WIN64)" == "define"
479 DEFINES = $(DEFINES) -DWIN64
480 OPTIMIZE = $(OPTIMIZE) -fp:precise
483 # For now, silence warnings about "unsafe" CRT functions
484 # and POSIX CRT function names being deprecated.
485 DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
487 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
488 !IF "$(CCTYPE)" != "MSVC120"
489 DEFINES = $(DEFINES) -D_WINSOCK_DEPRECATED_NO_WARNINGS
493 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
494 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
495 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
496 version.lib odbc32.lib odbccp32.lib comctl32.lib
498 !IF "$(CCTYPE)" != "MSVC120"
499 ! IF "$(CFG)" == "DebugFull"
500 LIBBASEFILES = $(LIBBASEFILES) msvcrtd.lib vcruntimed.lib
502 LIBBASEFILES = $(LIBBASEFILES) msvcrt.lib vcruntime.lib
506 # Avoid __intel_new_proc_init link error for libircmt.
507 # libmmd is /MD equivelent, other variants exist.
508 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
509 # and optimized C89 funcs
510 !IF "$(__ICC)" == "define"
511 LIBBASEFILES = $(LIBBASEFILES) libircmt.lib libmmd.lib
514 LIBFILES = $(LIBBASEFILES) $(LIBC)
516 !IF "$(__ICC)" == "define"
517 EXTRACFLAGS = $(EXTRACFLAGS) -Qstd=c99
519 !IF "$(USE_CPLUSPLUS)" == "define"
520 EXTRACFLAGS = $(EXTRACFLAGS) $(CXX_FLAG)
522 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
523 $(PCHFLAGS) $(OPTIMIZE)
524 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
525 -libpath:"$(INST_COREDIR)" \
526 -machine:$(PROCESSOR_ARCHITECTURE)
527 LIB_FLAGS = $(LIB_FLAGS) -nologo
531 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
535 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
537 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
539 !IF "$(WIN64)" == "define"
540 LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.02"
542 LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.01"
545 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
547 #################### do not edit below this line #######################
548 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
556 #clear the list, we dont support .cxx .bas .cbl .for .pas .f .f90
557 # .asm .cpp are not currently used but they are included for completeness
559 .SUFFIXES : .c $(o) .cpp .asm .dll .lib .exe .rc .res
562 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
565 $(CC) -c -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $<
571 $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \
572 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
575 $(RSC) -i.. $(RSC_FLAGS) $<
580 # makedef.pl must be updated if this changes, and this should normally
581 # only change when there is an incompatible revision of the public API.
582 PERLIMPLIB = ..\perl537.lib
583 PERLSTATICLIB = ..\perl537s.lib
584 PERLDLL = ..\perl537.dll
586 MINIPERL = ..\miniperl.exe
588 PERLEXE = ..\perl.exe
589 WPERLEXE = ..\wperl.exe
590 PERLEXESTATIC = ..\perl-static.exe
591 GLOBEXE = ..\perlglob.exe
592 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
593 GENUUDMAP = ..\generate_uudmap.exe
594 !IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
600 # Unicode data files generated by mktables
601 FIRSTUNIFILE = ..\lib\unicore\Decomposition.pl
602 UNIDATAFILES = ..\lib\unicore\Decomposition.pl \
603 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
604 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \
605 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
606 ..\lib\unicore\TestProp.pl
608 # Directories of Unicode data files generated by mktables
609 UNIDATADIR1 = ..\lib\unicore\To
610 UNIDATADIR2 = ..\lib\unicore\lib
612 PERLEXE_MANIFEST= .\perlexe.manifest
613 PERLEXE_ICO = .\perlexe.ico
614 PERLEXE_RES = .\perlexe.res
617 # Nominate a target which causes extensions to be re-built
618 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
619 # on and really only the interface - i.e. the .def file used to export symbols
621 PERLDEP = perldll.def
623 PL2BAT = bin\pl2bat.pl
624 GLOBBAT = bin\perlglob.bat
645 ..\utils\zipdetails \
660 CFGSH_TMPL = config.vc
661 CFGH_TMPL = config_H.vc
664 XCOPY = xcopy /f /r /i /d /y
665 RCOPY = xcopy /f /r /i /e /d /y
713 EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
715 !IF "$(PERL_MALLOC)" == "define"
716 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
719 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
764 .\include\sys\errno2.h \
765 .\include\sys\socket.h \
768 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
770 UUDMAP_H = ..\uudmap.h
771 BITCOUNT_H = ..\bitcount.h
772 MG_DATA_H = ..\mg_data.h
773 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
775 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
776 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
777 WIN32_OBJ = $(WIN32_SRC:.c=.obj)
778 MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
779 $(MINIDIR)\miniperlmain$(o) \
780 $(MINIDIR)\perlio$(o)
781 MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
782 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
783 DLL_OBJ = $(DYNALOADER)
784 GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.obj)
786 PERLDLL_OBJ = $(CORE_OBJ)
787 PERLEXE_OBJ = perlmain$(o)
788 PERLEXEST_OBJ = perlmainst$(o)
790 PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
792 !IF "$(USE_SETARGV)" != ""
793 SETARGV_OBJ = setargv$(o)
796 !IF "$(ALL_STATIC)" == "define"
797 # some exclusions, unfortunately, until fixed:
798 # - MakeMaker isn't capable enough for SDBM_File (small bug)
799 STATIC_EXT = * !SDBM_File
801 # specify static extensions here, for example:
802 # (be sure to include Win32CORE to load Win32 on demand)
803 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
804 STATIC_EXT = Win32CORE
807 DYNALOADER = ..\DynaLoader$(o)
810 "INST_TOP=$(INST_TOP)" \
811 "INST_VER=$(INST_VER)" \
812 "INST_ARCH=$(INST_ARCH)" \
813 "archname=$(ARCHNAME)" \
816 "ccflags=$(EXTRACFLAGS) $(DEFINES) $(BUILDOPT)" \
817 "usecplusplus=$(USE_CPLUSPLUS)" \
818 "cf_email=$(EMAIL)" \
819 "d_mymalloc=$(PERL_MALLOC)" \
821 "incpath=$(CCINCDIR:"=\")" \
822 "libperl=$(PERLIMPLIB:..\=)" \
823 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
825 "make=$(MAKE_BARE)" \
826 "static_ext=$(STATIC_EXT)" \
827 "usethreads=$(USE_ITHREADS)" \
828 "useithreads=$(USE_ITHREADS)" \
829 "usemultiplicity=$(USE_MULTI)" \
830 "use64bitint=$(USE_64_BIT_INT)" \
831 "uselongdouble=undef" \
832 "usequadmath=undef" \
833 "usesitecustomize=$(USE_SITECUST)" \
834 "default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
835 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
836 "optimize=$(OPTIMIZE:"=\")" \
838 "SKIP_CCHOME_CHECK=$(SKIP_CCHOME_CHECK)"
844 all : ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
845 $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions \
847 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
849 regnodes : ..\regnodes.h
851 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
853 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
855 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
856 $(UNIDATAFILES) $(PERLEXE) Extensions_reonly
857 @echo Perl and 're' are up to date.
859 static: $(PERLEXESTATIC)
861 #------------------------------------------------------------
863 $(GLOBEXE) : perlglob$(o)
864 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ \
865 perlglob$(o) setargv$(o)
867 perlglob$(o) : perlglob.c
869 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
870 cd .. && miniperl -Ilib make_patchnum.pl && cd win32
872 # make sure that we recompile perl.c if the git version changes
873 ..\perl$(o) : ..\git_version.h
875 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
876 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
878 # This target is for when changes to the main config.sh happen.
879 # Edit config.vc, then make perl in a minimal configuration (i.e. with MULTI,
880 # ITHREADS, IMP_SYS and LARGE_FILES off), then make this target
881 # to regenerate config_H.vc.
883 $(MINIPERL) -I..\lib config_sh.PL --prebuilt $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
884 $(MINIPERL) -I..\lib ..\configpm --chdir=..
886 -$(MINIPERL) -I..\lib config_h.PL
887 rename config.h $(CFGH_TMPL)
889 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\git_version.h
890 $(MINIPERL) -I..\lib ..\configpm --chdir=..
891 $(XCOPY) ..\*.h $(COREDIR)\*.*
892 $(XCOPY) *.h $(COREDIR)\*.*
893 $(RCOPY) include $(COREDIR)\*.*
894 -$(MINIPERL) -I..\lib config_h.PL
895 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
897 .\config.h : $(CONFIGPM)
899 # See the comment in Makefile.SH explaining this seemingly cranky ordering
900 $(MINIPERL) : ..\lib\buildcustomize.pl
902 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
903 $(LINK32) -out:$(MINIPERL) @<<
904 $(BLINK_FLAGS) $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
906 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
908 $(MINIDIR)\.exists : $(CFGH_TMPL)
909 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
911 # Copy the template config.h and set configurables at the end of it
912 # as per the options chosen and compiler used.
913 # Note: This config.h is only used to build miniperl.exe anyway, but
914 # it's as well to have its options correct to be sure that it builds
915 # and so that it's "-V" options are correct for use by makedef.pl. The
916 # real config.h used to build perl.exe is generated from the top-level
917 # config_h.SH by config_h.PL (run by miniperl.exe).
919 copy $(CFGH_TMPL) config.h
921 echo #ifndef _config_h_footer_&& \
922 echo #define _config_h_footer_&& \
923 echo #undef PTRSIZE&& \
924 echo #undef SSize_t&& \
925 echo #undef HAS_ATOLL&& \
926 echo #undef HAS_STRTOLL&& \
927 echo #undef HAS_STRTOULL&& \
928 echo #undef Size_t_size&& \
929 echo #undef IVTYPE&& \
930 echo #undef UVTYPE&& \
931 echo #undef IVSIZE&& \
932 echo #undef UVSIZE&& \
933 echo #undef NV_PRESERVES_UV&& \
934 echo #undef NV_PRESERVES_UV_BITS&& \
940 echo #undef USE_64_BIT_INT&& \
941 echo #undef USE_LONG_DOUBLE&& \
942 echo #undef USE_CPLUSPLUS)>> config.h
943 !IF "$(CCTYPE)" != "MSVC120"
944 @(echo #undef FILE_ptr&& \
945 echo #undef FILE_cnt&& \
946 echo #undef FILE_base&& \
947 echo #undef FILE_bufsiz&& \
948 echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
949 echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
950 echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
951 echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
952 echo #define I_STDBOOL)>> config.h
954 !IF "$(WIN64)"=="define"
955 @(echo #define PTRSIZE ^8&& \
956 echo #define SSize_t $(INT64)&& \
957 echo #define HAS_ATOLL&& \
958 echo #define HAS_STRTOLL&& \
959 echo #define HAS_STRTOULL&& \
960 echo #define Size_t_size ^8)>> config.h
962 @(echo #define PTRSIZE ^4&& \
963 echo #define SSize_t int&& \
964 echo #undef HAS_ATOLL&& \
965 echo #undef HAS_STRTOLL&& \
966 echo #undef HAS_STRTOULL&& \
967 echo #define Size_t_size ^4)>> config.h
969 !IF "$(USE_64_BIT_INT)"=="define"
970 @(echo #define IVTYPE $(INT64)&& \
971 echo #define UVTYPE unsigned $(INT64)&& \
972 echo #define IVSIZE ^8&& \
973 echo #define UVSIZE ^8&& \
974 echo #undef NV_PRESERVES_UV&& \
975 echo #define NV_PRESERVES_UV_BITS 53&& \
976 echo #define IVdf "I64d"&& \
977 echo #define UVuf "I64u"&& \
978 echo #define UVof "I64o"&& \
979 echo #define UVxf "I64x"&& \
980 echo #define UVXf "I64X"&& \
981 echo #define USE_64_BIT_INT)>> config.h
983 @(echo #define IVTYPE long&& \
984 echo #define UVTYPE unsigned long&& \
985 echo #define IVSIZE ^4&& \
986 echo #define UVSIZE ^4&& \
987 echo #define NV_PRESERVES_UV&& \
988 echo #define NV_PRESERVES_UV_BITS 32&& \
989 echo #define IVdf "ld"&& \
990 echo #define UVuf "lu"&& \
991 echo #define UVof "lo"&& \
992 echo #define UVxf "lx"&& \
993 echo #define UVXf "lX"&& \
994 echo #undef USE_64_BIT_INT)>> config.h
996 !IF "$(USE_CPLUSPLUS)"=="define"
997 @(echo #define USE_CPLUSPLUS&& \
998 echo #endif)>> config.h
1000 @(echo #undef USE_CPLUSPLUS&& \
1001 echo #endif)>> config.h
1003 #separate line since this is sentinal that this target is done
1004 @rem. > $(MINIDIR)\.exists
1006 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1007 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
1009 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1010 $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
1012 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1013 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1014 !IF "$(USE_IMP_SYS)" == "define"
1015 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1016 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1019 # 1. we don't want to rebuild miniperl.exe when config.h changes
1020 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1021 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1022 $(MINI_OBJ) : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1024 $(WIN32_OBJ) : $(CORE_H)
1025 $(CORE_OBJ) : $(CORE_H)
1026 $(DLL_OBJ) : $(CORE_H)
1028 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl ..\git_version.h
1029 $(MINIPERL) -I..\lib create_perllibst_h.pl
1030 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
1031 CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1033 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1034 $(LINK32) -dll -def:perldll.def -out:$@ @Extensions_static @<<
1035 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
1037 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1039 $(PERLSTATICLIB): Extensions_static
1040 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<<
1043 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1045 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1047 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1049 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1051 $(BITCOUNT_H) : $(GENUUDMAP)
1052 $(GENUUDMAP) $(GENERATED_HEADERS)
1054 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1056 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1057 $(LINK32) -out:$@ @<<
1058 $(BLINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ)
1061 perlmain.c : runperl.c
1062 copy runperl.c perlmain.c
1064 perlmain$(o) : perlmain.c
1065 $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
1067 perlmainst.c : runperl.c
1068 copy runperl.c perlmainst.c
1070 perlmainst$(o) : perlmainst.c
1071 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1073 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1074 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1075 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1076 copy $(PERLEXE) $(WPERLEXE)
1077 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1079 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1080 $(LINK32) -out:$@ $(BLINK_FLAGS) \
1081 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1083 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1084 $(MINIPERL) -I..\lib ..\mkppport
1086 #-------------------------------------------------------------------------------
1087 # There's no direct way to mark a dependency on
1088 # DynaLoader.pm, so this will have to do
1089 Extensions: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1090 $(XCOPY) ..\*.h $(COREDIR)\*.*
1091 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1093 Extensions_reonly: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1094 $(XCOPY) ..\*.h $(COREDIR)\*.*
1095 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1097 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1098 $(XCOPY) ..\*.h $(COREDIR)\*.*
1099 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1100 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1102 Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1103 $(XCOPY) ..\*.h $(COREDIR)\*.*
1104 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1106 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1107 $(XCOPY) ..\*.h $(COREDIR)\*.*
1108 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1111 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1113 Extensions_realclean:
1114 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1116 #-------------------------------------------------------------------------------
1118 doc: $(PERLEXE) ..\pod\perltoc.pod
1119 $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1120 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML::=|)" \
1123 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1124 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1126 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1127 # so please check that script before making structural changes here
1129 utils: $(PERLEXE) ..\utils\Makefile
1131 $(MAKE) PERL=$(MINIPERL)
1133 copy ..\README.aix ..\pod\perlaix.pod
1134 copy ..\README.amiga ..\pod\perlamiga.pod
1135 copy ..\README.android ..\pod\perlandroid.pod
1136 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1137 copy ..\README.cn ..\pod\perlcn.pod
1138 copy ..\README.cygwin ..\pod\perlcygwin.pod
1139 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1140 copy ..\README.haiku ..\pod\perlhaiku.pod
1141 copy ..\README.hpux ..\pod\perlhpux.pod
1142 copy ..\README.hurd ..\pod\perlhurd.pod
1143 copy ..\README.irix ..\pod\perlirix.pod
1144 copy ..\README.jp ..\pod\perljp.pod
1145 copy ..\README.ko ..\pod\perlko.pod
1146 copy ..\README.linux ..\pod\perllinux.pod
1147 copy ..\README.macosx ..\pod\perlmacosx.pod
1148 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1149 copy ..\README.os2 ..\pod\perlos2.pod
1150 copy ..\README.os390 ..\pod\perlos390.pod
1151 copy ..\README.os400 ..\pod\perlos400.pod
1152 copy ..\README.plan9 ..\pod\perlplan9.pod
1153 copy ..\README.qnx ..\pod\perlqnx.pod
1154 copy ..\README.riscos ..\pod\perlriscos.pod
1155 copy ..\README.solaris ..\pod\perlsolaris.pod
1156 copy ..\README.synology ..\pod\perlsynology.pod
1157 copy ..\README.tru64 ..\pod\perltru64.pod
1158 copy ..\README.tw ..\pod\perltw.pod
1159 copy ..\README.vos ..\pod\perlvos.pod
1160 copy ..\README.win32 ..\pod\perlwin32.pod
1161 copy ..\pod\perldelta.pod ..\pod\perl5373delta.pod
1163 $(PERLEXE) $(PL2BAT) $(UTILS)
1164 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1165 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1167 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1168 $(PERLEXE) -f ..\pod\buildtoc -q
1170 # Note that the pod cleanup in this next section is parsed (and regenerated
1171 # by pod/buildtoc so please check that script before making changes here
1173 distclean: realclean
1174 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1175 $(PERLIMPLIB) ..\miniperl.lib $(PERLEXESTATIC) $(PERLSTATICLIB)
1176 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1177 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1178 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1179 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1180 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1181 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1182 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1183 -del /f $(LIBDIR)\File\Glob.pm
1184 -del /f $(LIBDIR)\Storable.pm
1185 -del /f $(LIBDIR)\Sys\Hostname.pm
1186 -del /f $(LIBDIR)\Time\HiRes.pm
1187 -del /f $(LIBDIR)\Unicode\Normalize.pm
1188 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1189 -del /f $(LIBDIR)\Win32.pm
1190 -del /f $(LIBDIR)\Win32CORE.pm
1191 -del /f $(LIBDIR)\Win32API\File.pm
1192 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1193 -del /f $(LIBDIR)\buildcustomize.pl
1194 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1196 -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
1197 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1198 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1199 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1200 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1201 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1202 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1203 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1204 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1205 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1206 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1207 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1208 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1209 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1210 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1211 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1212 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1213 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1214 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1215 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1216 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1217 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1218 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1219 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1220 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1221 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1222 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1223 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1224 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1225 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1226 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1227 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1228 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1229 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1230 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1231 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1232 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1233 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1234 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1235 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1236 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1237 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1238 -if exist $(LIBDIR)\Pod\Html rmdir /s /q $(LIBDIR)\Pod\Html
1239 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1240 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1241 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1242 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1243 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1244 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1245 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1246 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1247 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1248 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1249 -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
1250 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1251 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1252 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1253 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1254 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1255 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1256 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1257 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1258 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1259 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1260 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1261 perl5373delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1262 perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \
1263 perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
1264 perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
1265 perlmacosx.pod perlmodlib.pod perlopenbsd.pod perlos2.pod \
1266 perlos390.pod perlos400.pod perlplan9.pod perlqnx.pod \
1267 perlriscos.pod perlsolaris.pod perlsynology.pod perltoc.pod \
1268 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1270 -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
1271 perldoc perlivp libnetcfg enc2xs encguess piconv cpan streamzip *.bat \
1272 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1273 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1276 -del /f ..\lib\Config_git.pl
1279 -del /f $(PERLEXE_RES) perl.base
1280 -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1281 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1282 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1283 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1284 -del /s ..\utils\Makefile
1285 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1286 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1287 -if exist pod2htmd.tmp del pod2htmd.tmp
1288 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1289 -del /f ..\t\test_state
1291 install : all installbare installhtml
1293 installbare : utils ..\pod\perltoc.pod
1294 $(PERLEXE) ..\installperl
1295 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1296 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1297 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1298 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1299 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1302 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1304 inst_lib : $(CONFIGPM)
1305 $(RCOPY) ..\lib $(INST_LIB)\*.*
1307 $(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1308 cd ..\lib\unicore && \
1309 ..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
1311 minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES)
1312 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1313 if exist ..\t\perl.exe del /f ..\t\perl.exe
1314 rename ..\t\miniperl.exe perl.exe
1315 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1316 # Note this perl.exe is miniperl
1317 cd ..\t && perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
1319 test-prep : all utils ../pod/perltoc.pod
1320 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1321 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1322 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1323 set PERL_STATIC_EXT=$(STATIC_EXT)
1327 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1330 test_porting : test-prep
1332 perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1335 test-reonly : reonly utils
1336 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1337 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1338 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1340 perl.exe harness $(OPT) -re \bre\\/ $(EXTRA)
1348 test-notty : test-prep
1349 set PERL_SKIP_TTY_TEST=1
1351 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1355 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1356 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1357 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1359 perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1363 -@$(DEL) miniperlmain$(o)
1364 -@$(DEL) $(MINIPERL)
1365 -@$(DEL) perlglob$(o)
1366 -@$(DEL) perlmain$(o)
1367 -@$(DEL) perlmainst$(o)
1369 -@$(DEL) ..\git_version.h
1372 -@$(DEL) $(WPERLEXE)
1373 -@$(DEL) $(PERLEXESTATIC)
1374 -@$(DEL) $(PERLSTATICLIB)
1376 -@$(DEL) $(CORE_OBJ)
1377 -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1378 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1379 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1380 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1381 -@$(DEL) $(UNIDATAFILES)
1382 -@$(DEL) $(WIN32_OBJ)
1384 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1385 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1388 -@$(DEL) Extensions_static
1390 clean : Extensions_clean _clean
1392 realclean : Extensions_realclean _clean
1394 # Handy way to run perlbug -ok without having to install and run the
1395 # installed perlbug. We don't re-run the tests here - we trust the user.
1396 # Please *don't* use this unless all tests pass.
1397 # If you want to report test failures, use "nmake nok" instead.
1399 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1402 $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1405 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1408 $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok