2 # Makefile to build perl on Windows using DMAKE.
4 # Microsoft Visual C++ 6.0 or later
5 # MinGW with gcc-3.2 or later
6 # Windows SDK 64-bit compiler and tools
8 # This is set up to build a perl.exe that runs off a shared library
9 # (perl519.dll). Also makes individual DLLs for the XS extensions.
13 ## Make sure you read README.win32 *before* you mess with anything here!
17 ## Build configuration. Edit the values below to suit your needs.
21 # Set these to wherever you want "dmake install" to put your
25 INST_TOP *= $(INST_DRV)\perl
28 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
29 # on a 64-bit version of Windows.
33 # Comment this out if you DON'T want your perl installation to be versioned.
34 # This means that the new installation will overwrite any files from the
35 # old installation at the same INST_TOP location. Leaving it enabled is
36 # the safest route, as perl adds the extra version directory to all the
37 # locations it installs files to. If you disable it, an alternative
38 # versioned installation can be obtained by setting INST_TOP above to a
39 # path that includes an arbitrary version string.
44 # Comment this out if you DON'T want your perl installation to have
45 # architecture specific components. This means that architecture-
46 # specific files will be installed along with the architecture-neutral
47 # files. Leaving it enabled is safer and more flexible, in case you
48 # want to build multiple flavors of perl and install them together in
49 # the same location. Commenting it out gives you a simpler
50 # installation that is easier to understand for beginners.
52 #INST_ARCH *= \$(ARCHNAME)
55 # Uncomment this if you want perl to run
56 # $Config{sitelibexp}\sitecustomize.pl
57 # before anything else. This script can then be set up, for example,
58 # to add additional entries to @INC.
60 #USE_SITECUST *= define
63 # uncomment to enable multiple interpreters. This is need for fork()
64 # emulation and for thread support.
69 # Interpreter cloning/threads; now reasonably complete.
70 # This should be enabled to get the fork() emulation.
71 # This needs USE_MULTI above.
73 USE_ITHREADS *= define
76 # uncomment to enable the implicit "host" layer for all system calls
77 # made by perl. This needs USE_MULTI above.
78 # This is also needed to get fork().
83 # Comment out next assign to disable perl's I/O subsystem and use compiler's
84 # stdio for IO - depending on your compiler vendor and run time library you may
85 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
86 # You will also be unable to take full advantage of perl5.8's support for multiple
87 # encodings and may see lower IO performance. You have been warned.
91 # Comment this out if you don't want to enable large file support for
92 # some reason. Should normally only be changed to maintain compatibility
93 # with an older release of perl.
94 USE_LARGE_FILES *= define
97 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
98 # (If you're building a 64-bit perl then you will have 64-bit integers whether
99 # or not this is uncommented.)
100 #USE_64_BIT_INT *= define
103 # uncomment exactly one of the following
105 # Visual C++ 6.x (aka Visual C++ 98)
107 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version)
109 # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
110 #CCTYPE *= MSVC70FREE
111 # Windows Server 2003 SP1 Platform SDK (April 2005)
113 # Visual C++ 2005 (aka Visual C++ 8.x) (full version)
115 # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
116 #CCTYPE *= MSVC80FREE
117 # Visual C++ 2008 (aka Visual C++ 9.x) (full version)
119 # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
120 #CCTYPE *= MSVC90FREE
121 # Visual C++ 2010 (aka Visual C++ 10.x) (full version)
123 # Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version)
124 #CCTYPE = MSVC100FREE
125 # Visual C++ 2012 (aka Visual C++ 11.x) (full version)
127 # Visual C++ 2012 Express Edition (aka Visual C++ 11.x) (free version)
128 #CCTYPE = MSVC110FREE
129 # MinGW or mingw-w64 with gcc-3.2 or later
133 # uncomment next line if you want debug version of perl (big,slow)
134 # If not enabled, we automatically try to use maximum optimization
135 # with all compilers that are known to have a working optimizer.
140 # uncomment to enable linking with setargv.obj under the Visual C
141 # compiler. Setting this options enables perl to expand wildcards in
142 # arguments, but it may be harder to use alternate methods like
143 # File::DosGlob that are more powerful. This option is supported only with
146 #USE_SETARGV *= define
149 # set this if you wish to use perl's malloc
150 # WARNING: Turning this on/off WILL break binary compatibility with extensions
151 # you may have compiled with/without it. Be prepared to recompile all
152 # extensions if you change the default. Currently, this cannot be enabled
153 # if you ask for USE_IMP_SYS above.
155 #PERL_MALLOC *= define
158 # set this to enable debugging mstats
159 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
160 # be enabled without PERL_MALLOC as well.
162 #DEBUG_MSTATS *= define
165 # set this to additionally provide a statically linked perl-static.exe.
166 # Note that dynamic loading will not work with this perl, so you must
167 # include required modules statically using the STATIC_EXT or ALL_STATIC
168 # variables below. A static library perl519s.lib will also be created.
169 # Ordinary perl.exe is not affected by this option.
171 #BUILD_STATIC *= define
174 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
175 # extension get statically built
176 # This will result in a very large perl executable, but the main purpose
177 # is to have proper linking set so as to be able to create miscellaneous
178 # executables with different built-in extensions
180 #ALL_STATIC *= define
183 # set the install locations of the compiler include/libraries
184 # Running VCVARS32.BAT is *required* when using Visual C.
185 # Some versions of Visual C don't define MSVCDIR in the environment,
186 # so you may have to set CCHOME explicitly (spaces in the path name should
189 .IF "$(CCTYPE)" == "GCC"
196 # uncomment this if you are using x86_64-w64-mingw32 cross-compiler
197 # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc'
198 # instead of the usual 'gcc'.
203 # Following sets $Config{incpath} and $Config{libpth}
206 .IF "$(GCCCROSS)" == "define"
207 CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include
208 CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib
209 CCDLLDIR *= $(CCLIBDIR)
211 CCINCDIR *= $(CCHOME)\include
212 CCLIBDIR *= $(CCHOME)\lib
213 CCDLLDIR *= $(CCHOME)\bin
217 # Additional compiler flags can be specified here.
219 BUILDOPT *= $(BUILDOPTEXTRA)
222 # This should normally be disabled. Enabling it will disable the File::Glob
223 # implementation of CORE::glob.
225 #BUILDOPT += -DPERL_EXTERNAL_GLOB
228 # Perl needs to read scripts in text mode so that the DATA filehandle
229 # works correctly with seek() and tell(), or around auto-flushes of
230 # all filehandles (e.g. by system(), backticks, fork(), etc).
232 # The current version on the ByteLoader module on CPAN however only
233 # works if scripts are read in binary mode. But before you disable text
234 # mode script reading (and break some DATA filehandle functionality)
235 # please check first if an updated ByteLoader isn't available on CPAN.
237 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
240 # specify semicolon-separated list of extra directories that modules will
241 # look for libraries (spaces in path names need not be quoted)
246 # set this to point to cmd.exe (only needed if you use some
247 # alternate shell that doesn't grok cmd.exe style commands)
249 #SHELL *= g:\winnt\system32\cmd.exe
252 # set this to your email address (perl will guess a value from
253 # from your loginname and your hostname, which may not be right)
258 ## Build configuration ends.
261 ##################### CHANGE THESE ONLY IF YOU MUST #####################
264 DEBUG_MSTATS *= undef
266 USE_SITECUST *= undef
268 USE_ITHREADS *= undef
271 USE_LARGE_FILES *= undef
272 USE_64_BIT_INT *= undef
274 .IF "$(USE_IMP_SYS)" == "define"
278 .IF "$(PERL_MALLOC)" == "undef"
282 .IF "$(DEBUG_MSTATS)" == "define"
283 BUILDOPT += -DPERL_DEBUGGING_MSTATS
286 .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
290 .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
294 .IF "$(USE_SITECUST)" == "define"
295 BUILDOPT += -DUSE_SITECUSTOMIZE
298 .IF "$(USE_MULTI)" != "undef"
299 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
302 .IF "$(USE_IMP_SYS)" != "undef"
303 BUILDOPT += -DPERL_IMPLICIT_SYS
306 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432 WIN64 CCHOME
308 PROCESSOR_ARCHITECTURE *= x86
311 # When we are running from a 32bit cmd.exe on AMD64 then
312 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
314 .IF "$(PROCESSOR_ARCHITEW6432)" != ""
315 PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
317 .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
324 .IF "$(WIN64)" == "define"
325 USE_64_BIT_INT = define
328 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
329 # both link against MSVCRT.dll (which is part of Windows itself) and
330 # not against a compiler specific versioned runtime.
331 .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
335 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
336 .IF "$(ARCHITECTURE)" == "AMD64"
339 .IF "$(ARCHITECTURE)" == "IA64"
343 .IF "$(USE_MULTI)" == "define"
344 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
346 .IF "$(USE_PERLIO)" == "define"
347 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
349 ARCHNAME = MSWin32-$(ARCHITECTURE)
353 .IF "$(USE_PERLIO)" == "define"
354 BUILDOPT += -DUSE_PERLIO
357 .IF "$(USE_ITHREADS)" == "define"
358 ARCHNAME !:= $(ARCHNAME)-thread
361 .IF "$(WIN64)" != "define"
362 .IF "$(USE_64_BIT_INT)" == "define"
363 ARCHNAME !:= $(ARCHNAME)-64int
367 ARCHDIR = ..\lib\$(ARCHNAME)
368 COREDIR = ..\lib\CORE
369 AUTODIR = ..\lib\auto
375 EXTUTILSDIR = $(LIBDIR)\ExtUtils
379 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
380 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
381 INST_LIB = $(INST_TOP)$(INST_VER)\lib
382 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
383 INST_COREDIR = $(INST_ARCHLIB)\CORE
384 INST_HTML = $(INST_TOP)$(INST_VER)\html
387 # Programs to compile, build .lib files and link
392 .IF "$(CCTYPE)" == "GCC"
394 .IF "$(GCCCROSS)" == "define"
395 ARCHPREFIX = x86_64-w64-mingw32-
398 CC = $(ARCHPREFIX)gcc
399 LINK32 = $(ARCHPREFIX)g++
400 LIB32 = $(ARCHPREFIX)ar rc
401 IMPLIB = $(ARCHPREFIX)dlltool
402 RSC = $(ARCHPREFIX)windres
412 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
414 .IF "$(WIN64)" == "define"
415 DEFINES += -DWIN64 -DCONSERVATIVE
417 LOCDEFS = -DPERLDLL -DPERL_CORE
421 # Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
422 # correctly if -lmsvcrt is specified explicitly.
428 -lmoldname -lkernel32 -luser32 -lgdi32 \
429 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
430 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
431 -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
433 .IF "$(CFG)" == "Debug"
434 OPTIMIZE = -g -O2 -DDEBUGGING
442 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
443 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
448 BUILDOPT += -fno-strict-aliasing -mms-bitfields
452 # All but the free version of VC++ 7.x can load DLLs on demand. Makes the test
453 # suite run in about 10% less time.
454 .IF "$(CCTYPE)" != "MSVC70FREE"
455 DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
458 # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
459 # DLLs. These either need copying everywhere with the binaries, or else need
460 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
461 # simplicity, embed them if they exist (and delete them afterwards so that they
462 # don't get installed too).
463 EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
464 if exist $@.manifest del $@.manifest
465 EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
466 if exist $@.manifest del $@.manifest
468 # Most relevant compiler-specific options fall into two groups:
469 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
470 .IF "$(CCTYPE)" == "MSVC60" || \
471 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
479 LIB32 = $(LINK32) -lib
486 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
487 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
488 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
489 LOCDEFS = -DPERLDLL -DPERL_CORE
495 .IF "$(CFG)" == "Debug"
496 OPTIMIZE = -Od -MD -Zi -DDEBUGGING
499 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
500 OPTIMIZE = -O1 -MD -Zi -DNDEBUG
501 # we enable debug symbols in release builds also
502 LINK_DBG = -debug -opt:ref,icf
503 # you may want to enable this if you want COFF symbols in the executables
504 # in addition to the PDB symbols. The default Dr. Watson that ships with
505 # Windows can use the the former but not latter. The free WinDbg can be
506 # installed to get better stack traces from just the PDB symbols, so we
507 # avoid the bloat of COFF symbols by default.
508 #LINK_DBG = $(LINK_DBG) -debugtype:both
509 .IF "$(WIN64)" == "define"
510 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
516 .IF "$(WIN64)" == "define"
517 DEFINES += -DWIN64 -DCONSERVATIVE
518 OPTIMIZE += -fp:precise
521 # For now, silence warnings from VC++ 8.x onwards about "unsafe" CRT functions
522 # and POSIX CRT function names being deprecated.
523 .IF "$(PREMSVC80)" == "undef"
524 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
527 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
528 # 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
529 # preprocessor option to revert back to the old functionality for
530 # backward compatibility. We define this symbol here for older 32-bit
531 # compilers only (which aren't using it at all) for the sole purpose
532 # of getting it into $Config{ccflags}. That way if someone builds
533 # Perl itself with e.g. VC6 but later installs an XS module using VC8
534 # the time_t types will still be compatible.
535 .IF "$(WIN64)" == "undef"
536 .IF "$(PREMSVC80)" == "define"
537 BUILDOPT += -D_USE_32BIT_TIME_T
542 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
543 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
544 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
545 version.lib odbc32.lib odbccp32.lib comctl32.lib
547 # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
548 # doesn't include the buffer overrun verification code used by the /GS switch.
549 # Since the code links against libraries that are compiled with /GS, this
550 # "security cookie verification" code must be included via bufferoverflow.lib.
551 .IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
552 LIBBASEFILES += bufferoverflowU.lib
555 LIBFILES = $(LIBBASEFILES) $(LIBC)
557 EXTRACFLAGS = -nologo -GF -W3
558 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
559 $(PCHFLAGS) $(OPTIMIZE)
560 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
561 -libpath:"$(INST_COREDIR)" \
562 -machine:$(PROCESSOR_ARCHITECTURE)
570 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
572 .IF "$(PREMSVC80)" == "undef"
573 LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
575 RSC_FLAGS = -DINCLUDE_MANIFEST
579 # used to allow local linking flags that are not propogated into Config.pm,
583 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
585 #################### do not edit below this line #######################
586 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
588 # Some old dmakes (including Sarathy's one at
589 # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
590 # don't support logical OR (||) or logical AND (&&) in conditional
591 # expressions and hence don't process this makefile correctly. Determine
592 # whether this is the case so that we can give the user an error message.
609 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
612 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
615 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
621 .IF "$(CCTYPE)" == "GCC"
622 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
623 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
625 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
626 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
631 .IF "$(CCTYPE)" == "GCC"
632 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
634 $(RSC) -i.. -DINCLUDE_MANIFEST $<
639 MINIPERL = ..\miniperl.exe
641 PERLEXE = ..\perl.exe
642 WPERLEXE = ..\wperl.exe
643 PERLEXESTATIC = ..\perl-static.exe
644 STATICDIR = .\static.tmp
645 GLOBEXE = ..\perlglob.exe
646 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
648 GENUUDMAP = ..\generate_uudmap.exe
649 .IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
655 # Unicode data files generated by mktables
656 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
657 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
658 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
659 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
661 # Directories of Unicode data files generated by mktables
662 UNIDATADIR1 = ..\lib\unicore\To
663 UNIDATADIR2 = ..\lib\unicore\lib
665 PERLEXE_MANIFEST= .\perlexe.manifest
666 PERLEXE_ICO = .\perlexe.ico
667 PERLEXE_RES = .\perlexe.res
670 # Nominate a target which causes extensions to be re-built
671 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
672 # on and really only the interface - i.e. the .def file used to export symbols
674 PERLDEP = perldll.def
677 PL2BAT = bin\pl2bat.pl
692 ..\utils\config_data \
701 ..\utils\zipdetails \
714 .IF "$(CCTYPE)" == "GCC"
716 CFGSH_TMPL = config.gc
717 CFGH_TMPL = config_H.gc
718 PERLIMPLIB = ..\libperl519$(a)
719 PERLSTATICLIB = ..\libperl519s$(a)
725 CFGSH_TMPL = config.vc
726 CFGH_TMPL = config_H.vc
732 # makedef.pl must be updated if this changes, and this should normally
733 # only change when there is an incompatible revision of the public API.
734 PERLIMPLIB *= ..\perl519$(a)
735 PERLSTATICLIB *= ..\perl519s$(a)
736 PERLDLL = ..\perl519.dll
738 XCOPY = xcopy /f /r /i /d /y
739 RCOPY = xcopy /f /r /i /e /d /y
780 EXTRACORE_SRC += perllib.c
782 .IF "$(PERL_MALLOC)" == "define"
783 EXTRACORE_SRC += ..\malloc.c
786 EXTRACORE_SRC += ..\perlio.c
794 # We need this for miniperl build unless we override canned
795 # config.h #define building mini\*
796 #.IF "$(USE_PERLIO)" == "define"
797 WIN32_SRC += .\win32io.c
844 .\include\sys\socket.h \
847 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
849 UUDMAP_H = ..\uudmap.h
850 BITCOUNT_H = ..\bitcount.h
851 MG_DATA_H = ..\mg_data.h
852 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
854 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
855 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
856 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
857 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
858 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
859 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
860 DLL_OBJ = $(DYNALOADER)
861 X2P_OBJ = $(X2P_SRC:db:+$(o))
862 GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
864 PERLDLL_OBJ = $(CORE_OBJ)
865 PERLEXE_OBJ = perlmain$(o)
866 PERLEXEST_OBJ = perlmainst$(o)
868 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
870 .IF "$(USE_SETARGV)" != ""
871 SETARGV_OBJ = setargv$(o)
874 .IF "$(ALL_STATIC)" == "define"
875 # some exclusions, unfortunately, until fixed:
876 # - MakeMaker isn't capable enough for SDBM_File (small bug)
877 STATIC_EXT = * !SDBM_File
879 # specify static extensions here, for example:
880 # (be sure to include Win32CORE to load Win32 on demand)
881 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
882 STATIC_EXT = Win32CORE
885 DYNALOADER = ..\DynaLoader$(o)
887 # vars must be separated by "\t+~\t+", since we're using the tempfile
888 # version of config_sh.pl (we were overflowing someone's buffer by
889 # trying to fit them all on the command line)
892 INST_TOP=$(INST_TOP) ~ \
893 INST_VER=$(INST_VER) ~ \
894 INST_ARCH=$(INST_ARCH) ~ \
895 archname=$(ARCHNAME) ~ \
898 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
899 cf_email=$(EMAIL) ~ \
900 d_mymalloc=$(PERL_MALLOC) ~ \
901 libs=$(LIBFILES:f) ~ \
902 incpath=$(CCINCDIR) ~ \
903 libperl=$(PERLIMPLIB:f) ~ \
904 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
911 static_ext=$(STATIC_EXT) ~ \
912 usethreads=$(USE_ITHREADS) ~ \
913 useithreads=$(USE_ITHREADS) ~ \
914 usemultiplicity=$(USE_MULTI) ~ \
915 useperlio=$(USE_PERLIO) ~ \
916 use64bitint=$(USE_64_BIT_INT) ~ \
917 uselargefiles=$(USE_LARGE_FILES) ~ \
918 usesitecustomize=$(USE_SITECUST) ~ \
919 LINK_FLAGS=$(LINK_FLAGS) ~ \
920 optimize=$(OPTIMIZE) ~ \
921 ARCHPREFIX=$(ARCHPREFIX) ~ \
924 ICWD = -I..\dist\Cwd -I..\dist\Cwd\lib
930 all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
931 $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
932 $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC)
934 regnodes : ..\regnodes.h
936 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
938 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
940 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
941 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
942 $(X2P) Extensions_reonly
944 static: $(PERLEXESTATIC)
946 #----------------------------------------------------------------
949 .IF "$(NEWDMAKE)" == "define"
952 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
953 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
957 $(GLOBEXE) : perlglob$(o)
958 .IF "$(CCTYPE)" == "GCC"
959 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
961 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
962 perlglob$(o) setargv$(o)
966 perlglob$(o) : perlglob.c
968 config.w32 : $(CFGSH_TMPL)
969 copy $(CFGSH_TMPL) config.w32
972 # Copy the template config.h and set configurables at the end of it
973 # as per the options chosen and compiler used.
974 # Note: This config.h is only used to build miniperl.exe anyway, but
975 # it's as well to have its options correct to be sure that it builds
976 # and so that it's "-V" options are correct for use by makedef.pl. The
977 # real config.h used to build perl.exe is generated from the top-level
978 # config_h.SH by config_h.PL (run by miniperl.exe).
980 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
982 copy $(CFGH_TMPL) config.h
984 @echo #ifndef _config_h_footer_>>$@
985 @echo #define _config_h_footer_>>$@
986 @echo #undef PTRSIZE>>$@
987 @echo #undef SSize_t>>$@
988 @echo #undef HAS_ATOLL>>$@
989 @echo #undef HAS_STRTOLL>>$@
990 @echo #undef HAS_STRTOULL>>$@
991 @echo #undef IVTYPE>>$@
992 @echo #undef UVTYPE>>$@
993 @echo #undef IVSIZE>>$@
994 @echo #undef UVSIZE>>$@
995 @echo #undef NV_PRESERVES_UV>>$@
996 @echo #undef NV_PRESERVES_UV_BITS>>$@
997 @echo #undef IVdf>>$@
998 @echo #undef UVuf>>$@
999 @echo #undef UVof>>$@
1000 @echo #undef UVxf>>$@
1001 @echo #undef UVXf>>$@
1002 @echo #undef USE_64_BIT_INT>>$@
1003 @echo #undef Size_t_size>>$@
1004 .IF "$(WIN64)"=="define"
1005 @echo #define PTRSIZE ^8>>$@
1006 @echo #define SSize_t $(INT64)>>$@
1007 @echo #define HAS_ATOLL>>$@
1008 @echo #define HAS_STRTOLL>>$@
1009 @echo #define HAS_STRTOULL>>$@
1010 @echo #define Size_t_size ^8>>$@
1012 @echo #define PTRSIZE ^4>>$@
1013 @echo #define SSize_t int>>$@
1014 @echo #undef HAS_ATOLL>>$@
1015 @echo #undef HAS_STRTOLL>>$@
1016 @echo #undef HAS_STRTOULL>>$@
1017 @echo #define Size_t_size ^4>>$@
1019 .IF "$(USE_64_BIT_INT)"=="define"
1020 @echo #define IVTYPE $(INT64)>>$@
1021 @echo #define UVTYPE unsigned $(INT64)>>$@
1022 @echo #define IVSIZE ^8>>$@
1023 @echo #define UVSIZE ^8>>$@
1024 @echo #undef NV_PRESERVES_UV>>$@
1025 @echo #define NV_PRESERVES_UV_BITS 53>>$@
1026 @echo #define IVdf "$(INT64f)d">>$@
1027 @echo #define UVuf "$(INT64f)u">>$@
1028 @echo #define UVof "$(INT64f)o">>$@
1029 @echo #define UVxf "$(INT64f)x">>$@
1030 @echo #define UVXf "$(INT64f)X">>$@
1031 @echo #define USE_64_BIT_INT>>$@
1033 @echo #define IVTYPE long>>$@
1034 @echo #define UVTYPE unsigned long>>$@
1035 @echo #define IVSIZE ^4>>$@
1036 @echo #define UVSIZE ^4>>$@
1037 @echo #define NV_PRESERVES_UV>>$@
1038 @echo #define NV_PRESERVES_UV_BITS 32>>$@
1039 @echo #define IVdf "ld">>$@
1040 @echo #define UVuf "lu">>$@
1041 @echo #define UVof "lo">>$@
1042 @echo #define UVxf "lx">>$@
1043 @echo #define UVXf "lX">>$@
1044 @echo #undef USE_64_BIT_INT>>$@
1048 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
1049 cd .. && miniperl -Ilib make_patchnum.pl
1051 # make sure that we recompile perl.c if the git version changes
1052 ..\perl$(o) : ..\git_version.h
1054 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1055 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1056 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1058 # This target is for when changes to the main config.sh happen.
1059 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1060 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
1061 # this target to regenerate config_H.gc.
1063 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1064 $(CFGSH_TMPL) > ..\config.sh
1065 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1066 -del /f $(CFGH_TMPL)
1067 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1068 rename config.h $(CFGH_TMPL)
1070 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
1071 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1072 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1073 $(XCOPY) ..\*.h $(COREDIR)\*.*
1074 $(XCOPY) *.h $(COREDIR)\*.*
1075 $(RCOPY) include $(COREDIR)\*.*
1076 $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
1077 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1079 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1080 $(MINIPERL) : ..\lib\buildcustomize.pl
1082 ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
1083 .IF "$(CCTYPE)" == "GCC"
1084 $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \
1085 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1087 $(LINK32) -subsystem:console -out:$(MINIPERL) $(BLINK_FLAGS) \
1088 @$(mktmp $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ))
1091 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1094 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1096 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1097 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c
1099 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1100 $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*B).c
1102 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1103 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1104 # unless the .IF is true), so instead we use a .ELSE with the default.
1105 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1107 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1108 .IF "$(USE_IMP_SYS)" == "define"
1109 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1111 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1114 # 1. we don't want to rebuild miniperl.exe when config.h changes
1115 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1116 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1117 $(MINI_OBJ) : $(CORE_NOCFG_H)
1119 $(WIN32_OBJ) : $(CORE_H)
1121 $(CORE_OBJ) : $(CORE_H)
1123 $(DLL_OBJ) : $(CORE_H)
1125 $(X2P_OBJ) : $(CORE_H)
1127 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
1128 $(MINIPERL) -I..\lib create_perllibst_h.pl
1129 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1130 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1132 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1133 .IF "$(CCTYPE)" == "GCC"
1134 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1135 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1136 $(shell @type Extensions_static) \
1137 $(LIBFILES) $(LKPOST))
1138 $(IMPLIB) --output-lib $(PERLIMPLIB) \
1139 --dllname $(PERLDLL:b).dll \
1141 --base-file perl.base \
1142 --output-exp perl.exp
1143 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1144 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1145 $(shell @type Extensions_static) \
1146 $(LIBFILES) perl.exp $(LKPOST))
1148 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
1149 @Extensions_static \
1150 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1151 $(PERLDLL_RES) $(PERLDLL_OBJ))
1154 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1156 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1157 .IF "$(CCTYPE)" == "GCC"
1158 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1159 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1160 for %i in ($(shell @type Extensions_static)) do \
1161 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1162 $(ARCHPREFIX)ar x ..\%i && \
1163 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1164 cd .. && rmdir /s /q $(STATICDIR)
1166 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1167 @$(mktmp $(PERLDLL_OBJ))
1169 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1171 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1173 ..\x2p\a2p$(o) : ..\x2p\a2p.c
1174 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1176 ..\x2p\hash$(o) : ..\x2p\hash.c
1177 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1179 ..\x2p\str$(o) : ..\x2p\str.c
1180 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1182 ..\x2p\util$(o) : ..\x2p\util.c
1183 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1185 ..\x2p\walk$(o) : ..\x2p\walk.c
1186 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1188 $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions
1189 $(MINIPERL) -I..\lib ..\x2p\find2perl.PL
1190 $(MINIPERL) -I..\lib ..\x2p\s2p.PL
1191 .IF "$(CCTYPE)" == "GCC"
1192 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1193 $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
1195 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1196 @$(mktmp $(LIBFILES) $(X2P_OBJ))
1200 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1202 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1204 $(BITCOUNT_H) : $(GENUUDMAP)
1205 $(GENUUDMAP) $(GENERATED_HEADERS)
1207 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1209 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1210 .IF "$(CCTYPE)" == "GCC"
1211 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1212 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
1214 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1215 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
1219 perlmain.c : runperl.c
1220 copy runperl.c perlmain.c
1222 perlmain$(o) : perlmain.c
1223 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1225 perlmainst.c : runperl.c
1226 copy runperl.c perlmainst.c
1228 perlmainst$(o) : perlmainst.c
1229 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1231 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1232 .IF "$(CCTYPE)" == "GCC"
1233 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1234 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1236 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1237 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1240 copy $(PERLEXE) $(WPERLEXE)
1241 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1243 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1244 .IF "$(CCTYPE)" == "GCC"
1245 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1246 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1248 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1249 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1253 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1254 $(MINIPERL) -I..\lib ..\mkppport
1256 #-------------------------------------------------------------------------------
1257 # There's no direct way to mark a dependency on
1258 # DynaLoader.pm, so this will have to do
1259 Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1260 $(XCOPY) ..\*.h $(COREDIR)\*.*
1261 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1263 Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1264 $(XCOPY) ..\*.h $(COREDIR)\*.*
1265 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1267 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
1268 $(XCOPY) ..\*.h $(COREDIR)\*.*
1269 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1270 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1272 Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1273 $(XCOPY) ..\*.h $(COREDIR)\*.*
1274 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1276 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1277 $(XCOPY) ..\*.h $(COREDIR)\*.*
1278 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1281 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1283 Extensions_realclean :
1284 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1286 #-------------------------------------------------------------------------------
1289 doc: $(PERLEXE) ..\pod\perltoc.pod
1290 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1291 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1294 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1295 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1297 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1298 # so please check that script before making structural changes here
1299 utils: $(PERLEXE) $(X2P) ..\utils\Makefile
1300 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1301 copy ..\README.aix ..\pod\perlaix.pod
1302 copy ..\README.amiga ..\pod\perlamiga.pod
1303 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1304 copy ..\README.ce ..\pod\perlce.pod
1305 copy ..\README.cn ..\pod\perlcn.pod
1306 copy ..\README.cygwin ..\pod\perlcygwin.pod
1307 copy ..\README.dos ..\pod\perldos.pod
1308 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1309 copy ..\README.haiku ..\pod\perlhaiku.pod
1310 copy ..\README.hpux ..\pod\perlhpux.pod
1311 copy ..\README.hurd ..\pod\perlhurd.pod
1312 copy ..\README.irix ..\pod\perlirix.pod
1313 copy ..\README.jp ..\pod\perljp.pod
1314 copy ..\README.ko ..\pod\perlko.pod
1315 copy ..\README.linux ..\pod\perllinux.pod
1316 copy ..\README.macos ..\pod\perlmacos.pod
1317 copy ..\README.macosx ..\pod\perlmacosx.pod
1318 copy ..\README.netware ..\pod\perlnetware.pod
1319 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1320 copy ..\README.os2 ..\pod\perlos2.pod
1321 copy ..\README.os390 ..\pod\perlos390.pod
1322 copy ..\README.os400 ..\pod\perlos400.pod
1323 copy ..\README.plan9 ..\pod\perlplan9.pod
1324 copy ..\README.qnx ..\pod\perlqnx.pod
1325 copy ..\README.riscos ..\pod\perlriscos.pod
1326 copy ..\README.solaris ..\pod\perlsolaris.pod
1327 copy ..\README.symbian ..\pod\perlsymbian.pod
1328 copy ..\README.tru64 ..\pod\perltru64.pod
1329 copy ..\README.tw ..\pod\perltw.pod
1330 copy ..\README.vos ..\pod\perlvos.pod
1331 copy ..\README.win32 ..\pod\perlwin32.pod
1332 copy ..\pod\perldelta.pod ..\pod\perl5192delta.pod
1333 $(PERLEXE) $(PL2BAT) $(UTILS)
1334 $(PERLEXE) $(ICWD) ..\autodoc.pl ..
1335 $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q
1337 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1338 $(PERLEXE) -f ..\pod\buildtoc -q
1340 # Note that the pod cleanup in this next section is parsed (and regenerated
1341 # by pod/buildtoc so please check that script before making changes here
1343 distclean: realclean
1344 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1345 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1347 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1348 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1349 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1350 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1351 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1352 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1353 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1354 -del /f $(LIBDIR)\File\Glob.pm
1355 -del /f $(LIBDIR)\Storable.pm
1356 -del /f $(LIBDIR)\Sys\Hostname.pm
1357 -del /f $(LIBDIR)\Time\HiRes.pm
1358 -del /f $(LIBDIR)\Unicode\Normalize.pm
1359 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1360 -del /f $(LIBDIR)\Win32.pm
1361 -del /f $(LIBDIR)\Win32CORE.pm
1362 -del /f $(LIBDIR)\Win32API\File.pm
1363 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1364 -del /f $(LIBDIR)\buildcustomize.pl
1365 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1366 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1367 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1368 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1369 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1370 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1371 -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI
1372 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1373 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1374 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1375 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1376 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1377 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1378 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1379 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1380 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1381 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1382 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1383 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1384 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1385 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1386 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1387 -if exist $(LIBDIR)\I18N\LangTags rmdir /s /q $(LIBDIR)\I18N\LangTags
1388 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1389 -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q $(LIBDIR)\Module\Pluggable
1390 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1391 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1392 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1393 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1394 -if exist $(LIBDIR)\Log rmdir /s /q $(LIBDIR)\Log
1395 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1396 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1397 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1398 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1399 -if exist $(LIBDIR)\mro rmdir /s /q $(LIBDIR)\mro
1400 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1401 -if exist $(LIBDIR)\Object rmdir /s /q $(LIBDIR)\Object
1402 -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
1403 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1404 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1405 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1406 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1407 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1408 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1409 -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re
1410 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1411 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1412 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1413 -if exist $(LIBDIR)\Term\UI rmdir /s /q $(LIBDIR)\Term\UI
1414 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1415 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1416 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1417 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1418 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1419 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1420 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1421 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1422 perl5192delta.pod perlaix.pod perlamiga.pod perlapi.pod \
1423 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod perldos.pod \
1424 perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
1425 perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
1426 perlmacos.pod perlmacosx.pod perlmodlib.pod perlnetware.pod \
1427 perlopenbsd.pod perlos2.pod perlos390.pod perlos400.pod \
1428 perlplan9.pod perlqnx.pod perlriscos.pod perlsolaris.pod \
1429 perlsymbian.pod perltoc.pod perltru64.pod perltw.pod \
1430 perluniprops.pod perlvos.pod perlwin32.pod
1431 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1432 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
1433 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist config_data zipdetails
1434 -cd ..\x2p && del /f find2perl s2p psed *.bat
1435 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1438 -del /f ..\lib\Config_git.pl
1441 -del /f $(PERLEXE_RES) perl.base
1442 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists pm_to_blib ppport.h
1443 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1444 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1445 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1446 -del /s ..\utils\Makefile
1447 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1448 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1449 -if exist pod2htmd.tmp del pod2htmd.tmp
1450 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1451 -del /f ..\t\test_state
1453 install : all installbare installhtml
1455 installbare : utils ..\pod\perltoc.pod
1456 $(PERLEXE) ..\installperl
1457 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1458 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1459 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1460 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1461 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1462 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1465 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1467 inst_lib : $(CONFIGPM)
1468 $(RCOPY) ..\lib $(INST_LIB)\*.*
1470 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1471 cd ..\lib\unicore && \
1472 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
1474 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1475 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1476 if exist ..\t\perl.exe del /f ..\t\perl.exe
1477 rename ..\t\miniperl.exe perl.exe
1478 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1481 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1483 test-prep : all utils ..\pod\perltoc.pod
1484 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1485 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1486 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1487 .IF "$(CCTYPE)" == "GCC"
1488 # If building with gcc versions 4.x.x or greater, then
1489 # the GCC helper DLL will also need copied to the test directory.
1490 # The name of the dll can change, depending upon which vendor has supplied
1491 # your compiler, and upon the values of "x".
1492 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1493 # Without this copying, the op/taint.t test script will fail.
1494 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1495 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1496 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1500 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1501 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1503 test_porting : test-prep
1504 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1505 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1507 test-reonly : reonly utils
1508 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1509 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1510 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1512 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
1516 cd .. && regen.pl && cd win32
1518 test-notty : test-prep
1519 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1520 set PERL_SKIP_TTY_TEST=1 && \
1521 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1524 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1525 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1526 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1527 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1528 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1531 -@erase miniperlmain$(o)
1533 -@erase perlglob$(o)
1534 -@erase perlmain$(o)
1535 -@erase perlmainst$(o)
1538 -@erase /f ..\git_version.h
1542 -@erase $(PERLEXESTATIC)
1543 -@erase $(PERLSTATICLIB)
1546 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1547 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1548 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1549 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1550 -@erase $(UNIDATAFILES)
1551 -@erase $(WIN32_OBJ)
1554 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1555 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1556 -@erase ..\x2p\*.exe ..\x2p\*.bat
1560 -@erase Extensions_static
1564 clean : Extensions_clean _clean
1566 realclean : Extensions_realclean _clean
1568 # Handy way to run perlbug -ok without having to install and run the
1569 # installed perlbug. We don't re-run the tests here - we trust the user.
1570 # Please *don't* use this unless all tests pass.
1571 # If you want to report test failures, use "dmake nok" instead.
1573 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1576 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1579 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1582 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok