2 # Makefile to build perl on Windows using GNU make + gcc + MinGW.
4 # This is set up to build a perl.exe that runs off a shared library
5 # (perl523.dll). Also makes individual DLLs for the XS extensions.
7 # The easiest way to customize the build process is to use parameters like this:
9 # c:\dev\perlsrc\win32> gmake INST_TOP=c:\sw\perl CCHOME=c:\sw\mingw USE_64_BIT_INT=define
13 ## Make sure you read README.win32 *before* you mess with anything here!
17 # We set this to point to cmd.exe in case GNU Make finds sh.exe in the path.
18 # Comment this line out if necessary
22 # define whether you want to use native gcc compiler or cross-compiler
23 # possible values: gcc
24 # i686-w64-mingw32-gcc
25 # x86_64-w64-mingw32-gcc
28 ifeq ($(GCCBIN),x86_64-w64-mingw32-gcc)
29 GCCCROSS := x86_64-w64-mingw32
31 ifeq ($(GCCBIN),i686-w64-mingw32-gcc)
32 GCCCROSS := i686-w64-mingw32
35 GCCTARGET := $(shell $(GCCBIN) -dumpmachine)
36 GCCVER1 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%i)
37 GCCVER2 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%j)
38 GCCVER3 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%k)
40 ifeq ($(GCCTARGET),x86_64-w64-mingw32)
44 ifeq ($(GCCTARGET),i686-w64-mingw32)
50 ## Build configuration. Edit the values below to suit your needs.
54 # Set these to wherever you want "gmake install" to put your
58 INST_TOP := $(INST_DRV)\perl
61 # Comment this out if you DON'T want your perl installation to be versioned.
62 # This means that the new installation will overwrite any files from the
63 # old installation at the same INST_TOP location. Leaving it enabled is
64 # the safest route, as perl adds the extra version directory to all the
65 # locations it installs files to. If you disable it, an alternative
66 # versioned installation can be obtained by setting INST_TOP above to a
67 # path that includes an arbitrary version string.
72 # Comment this out if you DON'T want your perl installation to have
73 # architecture specific components. This means that architecture-
74 # specific files will be installed along with the architecture-neutral
75 # files. Leaving it enabled is safer and more flexible, in case you
76 # want to build multiple flavors of perl and install them together in
77 # the same location. Commenting it out gives you a simpler
78 # installation that is easier to understand for beginners.
80 #INST_ARCH := \$(ARCHNAME)
83 # Uncomment this if you want perl to run
84 # $Config{sitelibexp}\sitecustomize.pl
85 # before anything else. This script can then be set up, for example,
86 # to add additional entries to @INC.
88 #USE_SITECUST := define
91 # uncomment to enable multiple interpreters. This is needed for fork()
92 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
93 # and USE_ITHREADS below.
98 # Interpreter cloning/threads; now reasonably complete.
99 # This should be enabled to get the fork() emulation. This needs (and
100 # will auto-enable) USE_MULTI above.
102 USE_ITHREADS := define
105 # uncomment to enable the implicit "host" layer for all system calls
106 # made by perl. This is also needed to get fork(). This needs (and
107 # will auto-enable) USE_MULTI above.
109 USE_IMP_SYS := define
112 # Comment out next assign to disable perl's I/O subsystem and use compiler's
113 # stdio for IO - depending on your compiler vendor and run time library you may
114 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
115 # You will also be unable to take full advantage of perl5.8's support for multiple
116 # encodings and may see lower IO performance. You have been warned.
121 # Comment this out if you don't want to enable large file support for
122 # some reason. Should normally only be changed to maintain compatibility
123 # with an older release of perl.
125 USE_LARGE_FILES := define
128 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
129 # (If you're building a 64-bit perl then you will have 64-bit integers whether
130 # or not this is uncommented.)
131 # Note: This option is not supported in 32-bit MSVC60 builds.
133 #USE_64_BIT_INT := define
136 # Uncomment this if you want to support the use of long doubles.
138 #USE_LONG_DOUBLE :=define
141 # uncomment next line if you want debug version of perl (big,slow)
142 # If not enabled, we automatically try to use maximum optimization
143 # with all compilers that are known to have a working optimizer.
148 # uncomment to enable linking with setargv.obj under the Visual C
149 # compiler. Setting this options enables perl to expand wildcards in
150 # arguments, but it may be harder to use alternate methods like
151 # File::DosGlob that are more powerful. This option is supported only with
154 #USE_SETARGV := define
157 # set this if you wish to use perl's malloc
158 # WARNING: Turning this on/off WILL break binary compatibility with extensions
159 # you may have compiled with/without it. Be prepared to recompile all
160 # extensions if you change the default. Currently, this cannot be enabled
161 # if you ask for USE_IMP_SYS above.
163 #PERL_MALLOC := define
166 # set this to enable debugging mstats
167 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
168 # be enabled without PERL_MALLOC as well.
170 #DEBUG_MSTATS := define
173 # set this to additionally provide a statically linked perl-static.exe.
174 # Note that dynamic loading will not work with this perl, so you must
175 # include required modules statically using the STATIC_EXT or ALL_STATIC
176 # variables below. A static library perl523s.lib will also be created.
177 # Ordinary perl.exe is not affected by this option.
179 #BUILD_STATIC := define
182 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
183 # extension get statically built
184 # This will result in a very large perl executable, but the main purpose
185 # is to have proper linking set so as to be able to create miscellaneous
186 # executables with different built-in extensions
188 #ALL_STATIC := define
191 # set the install locations of the compiler include/libraries
192 # Running VCVARS32.BAT is *required* when using Visual C.
193 # Some versions of Visual C don't define MSVCDIR in the environment,
194 # so you may have to set CCHOME explicitly (spaces in the path name should
200 # Following sets $Config{incpath} and $Config{libpth}
204 CCINCDIR := $(CCHOME)\$(GCCCROSS)\include
205 CCLIBDIR := $(CCHOME)\$(GCCCROSS)\lib
206 CCDLLDIR := $(CCLIBDIR)
207 ARCHPREFIX := $(GCCCROSS)-
209 CCINCDIR := $(CCHOME)\include
210 CCLIBDIR := $(CCHOME)\lib
211 CCDLLDIR := $(CCHOME)\bin
216 # Additional compiler flags can be specified here.
218 BUILDOPT := $(BUILDOPTEXTRA)
221 # This should normally be disabled. Enabling it will disable the File::Glob
222 # implementation of CORE::glob.
224 #BUILDOPT += -DPERL_EXTERNAL_GLOB
227 # Perl needs to read scripts in text mode so that the DATA filehandle
228 # works correctly with seek() and tell(), or around auto-flushes of
229 # all filehandles (e.g. by system(), backticks, fork(), etc).
231 # The current version on the ByteLoader module on CPAN however only
232 # works if scripts are read in binary mode. But before you disable text
233 # mode script reading (and break some DATA filehandle functionality)
234 # please check first if an updated ByteLoader isn't available on CPAN.
236 BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
239 # specify semicolon-separated list of extra directories that modules will
240 # look for libraries (spaces in path names need not be quoted)
245 # set this to your email address (perl will guess a value from
246 # from your loginname and your hostname, which may not be right)
251 ## Build configuration ends.
254 ##################### CHANGE THESE ONLY IF YOU MUST #####################
257 DEBUG_MSTATS ?= undef
259 USE_SITECUST ?= undef
261 USE_ITHREADS ?= undef
264 USE_LARGE_FILES ?= undef
265 USE_64_BIT_INT ?= undef
266 USE_LONG_DOUBLE ?= undef
268 ifeq ($(USE_IMP_SYS),define)
272 ifeq ($(PERL_MALLOC),undef)
276 ifeq ($(DEBUG_MSTATS),define)
277 BUILDOPT += -DPERL_DEBUGGING_MSTATS
280 ifeq ("$(USE_IMP_SYS) $(USE_MULTI)","define undef")
284 ifeq ("$(USE_ITHREADS) $(USE_MULTI)","define undef")
288 ifeq ($(USE_SITECUST),define)
289 BUILDOPT += -DUSE_SITECUSTOMIZE
292 ifneq ($(USE_MULTI),undef)
293 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
296 ifneq ($(USE_IMP_SYS),undef)
297 BUILDOPT += -DPERL_IMPLICIT_SYS
300 ifeq ($(WIN64),define)
301 USE_64_BIT_INT = define
304 ifeq ($(USE_MULTI),define)
305 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
307 ifeq ($(USE_PERLIO),define)
308 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
310 ARCHNAME = MSWin32-$(ARCHITECTURE)
314 ifeq ($(USE_PERLIO),define)
315 BUILDOPT += -DUSE_PERLIO
318 ifeq ($(USE_ITHREADS),define)
319 ARCHNAME := $(ARCHNAME)-thread
322 ifneq ($(WIN64),define)
323 ifeq ($(USE_64_BIT_INT),define)
324 ARCHNAME := $(ARCHNAME)-64int
328 ifeq ($(USE_LONG_DOUBLE),define)
329 ARCHNAME := $(ARCHNAME)-ld
332 ARCHDIR = ..\lib\$(ARCHNAME)
333 COREDIR = ..\lib\CORE
334 AUTODIR = ..\lib\auto
343 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
344 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
345 INST_LIB = $(INST_TOP)$(INST_VER)\lib
346 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
347 INST_COREDIR = $(INST_ARCHLIB)\CORE
348 INST_HTML = $(INST_TOP)$(INST_VER)\html
351 # Programs to compile, build .lib files and link
356 CC = $(ARCHPREFIX)gcc
357 LINK32 = $(ARCHPREFIX)g++
358 LIB32 = $(ARCHPREFIX)ar rc
359 IMPLIB = $(ARCHPREFIX)dlltool
360 RSC = $(ARCHPREFIX)windres
362 ifeq ($(USE_LONG_DOUBLE),define)
363 BUILDOPT += -D__USE_MINGW_ANSI_STDIO
364 MINIBUILDOPT += -D__USE_MINGW_ANSI_STDIO
367 # If you are using GCC, 4.3 or later by default we add the -fwrapv option.
368 # See https://rt.perl.org/Ticket/Display.html?id=121505
370 GCCWRAPV := $(shell if "$(GCCVER1)"=="4" (if "$(GCCVER2)" geq "3" echo define) else if "$(GCCVER1)" geq "5" (echo define))
372 ifeq ($(GCCWRAPV),define)
374 MINIBUILDOPT += -fwrapv
385 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
387 ifeq ($(WIN64),define)
388 DEFINES += -DWIN64 -DCONSERVATIVE
390 LOCDEFS = -DPERLDLL -DPERL_CORE
395 -lmoldname -lkernel32 -luser32 -lgdi32 \
396 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
397 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
398 -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
401 OPTIMIZE = -g -O2 -DDEBUGGING
409 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
410 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
415 BUILDOPT += -fno-strict-aliasing -mms-bitfields
416 MINIBUILDOPT += -fno-strict-aliasing
417 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
419 # used to allow local linking flags that are not propogated into Config.pm,
423 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
425 #################### do not edit below this line #######################
426 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
429 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
432 $(CC) -c -I$(<D) $(CFLAGS_O) -E $< >$@
438 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
439 $(IMPLIB) --input-def $(*F).def --output-lib $(*F).a $@
442 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
446 MINIPERL = ..\miniperl.exe
448 PERLEXE = ..\perl.exe
449 WPERLEXE = ..\wperl.exe
450 PERLEXESTATIC = ..\perl-static.exe
451 STATICDIR = .\static.tmp
452 GLOBEXE = ..\perlglob.exe
453 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
454 GENUUDMAP = ..\generate_uudmap.exe
455 ifeq ($(BUILD_STATIC),define)
458 ifeq ($(ALL_STATIC),define)
465 # Unicode data files generated by mktables
466 UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
467 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
468 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
469 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
471 # Directories of Unicode data files generated by mktables
472 UNIDATADIR1 = ..\lib\unicore\To
473 UNIDATADIR2 = ..\lib\unicore\lib
475 PERLEXE_MANIFEST= .\perlexe.manifest
476 PERLEXE_ICO = .\perlexe.ico
477 PERLEXE_RES = .\perlexe.res
480 # Nominate a target which causes extensions to be re-built
481 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
482 # on and really only the interface - i.e. the .def file used to export symbols
484 PERLDEP = perldll.def
487 PL2BAT = bin\pl2bat.pl
510 ..\utils\zipdetails \
520 CFGSH_TMPL = config.gc
521 CFGH_TMPL = config_H.gc
522 PERLIMPLIB = ..\libperl523$(a)
523 PERLSTATICLIB = ..\libperl523s$(a)
526 # makedef.pl must be updated if this changes, and this should normally
527 # only change when there is an incompatible revision of the public API.
528 PERLDLL = ..\perl523.dll
530 XCOPY = xcopy /f /r /i /d /y
531 RCOPY = xcopy /f /r /i /e /d /y
575 EXTRACORE_SRC += perllib.c
577 ifeq ($(PERL_MALLOC),define)
578 EXTRACORE_SRC += ..\malloc.c
581 EXTRACORE_SRC += ..\perlio.c
589 # We need this for miniperl build unless we override canned
590 # config.h #define building mini\*
591 #ifeq ($(USE_PERLIO)" == "define"
592 WIN32_SRC += .\win32io.c
632 .\include\sys\errno2.h \
633 .\include\sys\socket.h \
636 CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
638 UUDMAP_H = ..\uudmap.h
639 BITCOUNT_H = ..\bitcount.h
640 MG_DATA_H = ..\mg_data.h
641 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
643 MICROCORE_OBJ = $(MICROCORE_SRC:.c=.o)
644 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.o)
645 WIN32_OBJ = $(WIN32_SRC:.c=.o)
647 MINICORE_OBJ = $(subst ..\,mini\,$(MICROCORE_OBJ)) \
648 $(MINIDIR)\miniperlmain$(o) \
649 $(MINIDIR)\perlio$(o)
650 MINIWIN32_OBJ = $(subst .\,mini\,$(WIN32_OBJ))
651 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
652 DLL_OBJ = $(DYNALOADER)
653 GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.o)
655 PERLDLL_OBJ = $(CORE_OBJ)
656 PERLEXE_OBJ = perlmain$(o)
657 PERLEXEST_OBJ = perlmainst$(o)
659 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
661 ifneq ($(USE_SETARGV),)
662 SETARGV_OBJ = setargv$(o)
665 ifeq ($(ALL_STATIC),define)
666 # some exclusions, unfortunately, until fixed:
667 # - MakeMaker isn't capable enough for SDBM_File (small bug)
668 STATIC_EXT = * !SDBM_File
670 # specify static extensions here, for example:
671 # (be sure to include Win32CORE to load Win32 on demand)
672 #STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
673 STATIC_EXT = Win32CORE
676 DYNALOADER = ..\DynaLoader$(o)
678 # vars must be separated by "\t+~\t+", since we're using the tempfile
679 # version of config_sh.pl (we were overflowing someone's buffer by
680 # trying to fit them all on the command line)
683 "INST_TOP=$(INST_TOP)" \
684 "INST_VER=$(INST_VER)" \
685 "INST_ARCH=$(INST_ARCH)" \
686 "archname=$(ARCHNAME)" \
689 "ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT)" \
690 "cf_email=$(EMAIL)" \
691 "d_mymalloc=$(PERL_MALLOC)" \
693 "incpath=$(CCINCDIR)" \
694 "libperl=$(subst ..\,,$(PERLIMPLIB))" \
695 "libpth=$(CCLIBDIR);$(EXTRALIBDIRS)" \
702 "static_ext=$(STATIC_EXT)" \
703 "usethreads=$(USE_ITHREADS)" \
704 "useithreads=$(USE_ITHREADS)" \
705 "usemultiplicity=$(USE_MULTI)" \
706 "useperlio=$(USE_PERLIO)" \
707 "use64bitint=$(USE_64_BIT_INT)" \
708 "uselongdouble=$(USE_LONG_DOUBLE)" \
709 "uselargefiles=$(USE_LARGE_FILES)" \
710 "usesitecustomize=$(USE_SITECUST)" \
711 "LINK_FLAGS=$(LINK_FLAGS)" \
712 "optimize=$(OPTIMIZE)" \
713 "ARCHPREFIX=$(ARCHPREFIX)" \
722 all : info .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
723 $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
724 $(PERLEXE) Extensions Extensions_nonxs $(PERLSTATIC)
727 @echo # GCCBIN=$(GCCBIN)
728 @echo # GCCVER=$(GCCVER1).$(GCCVER2).$(GCCVER3)
729 @echo # GCCTARGET=$(GCCTARGET)
730 @echo # GCCCROSS=$(GCCCROSS)
731 @echo # WIN64=$(WIN64)
732 @echo # ARCHITECTURE=$(ARCHITECTURE)
733 @echo # ARCHNAME=$(ARCHNAME)
736 @echo Unable to detect gcc and/or architecture!
741 regnodes : ..\regnodes.h
743 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
745 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
747 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
748 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
751 static: $(PERLEXESTATIC)
753 #----------------------------------------------------------------
755 $(GLOBEXE) : perlglob$(o)
756 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
758 perlglob$(o) : perlglob.c
760 config.w32 : $(CFGSH_TMPL)
761 copy $(CFGSH_TMPL) config.w32
764 # Copy the template config.h and set configurables at the end of it
765 # as per the options chosen and compiler used.
766 # Note: This config.h is only used to build miniperl.exe anyway, but
767 # it's as well to have its options correct to be sure that it builds
768 # and so that it's "-V" options are correct for use by makedef.pl. The
769 # real config.h used to build perl.exe is generated from the top-level
770 # config_h.SH by config_h.PL (run by miniperl.exe).
772 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
774 copy $(CFGH_TMPL) config.h
776 @echo #ifndef _config_h_footer_>>$@
777 @echo #define _config_h_footer_>>$@
778 @echo #undef Off_t>>$@
779 @echo #undef LSEEKSIZE>>$@
780 @echo #undef Off_t_size>>$@
781 @echo #undef PTRSIZE>>$@
782 @echo #undef SSize_t>>$@
783 @echo #undef HAS_ATOLL>>$@
784 @echo #undef HAS_STRTOLL>>$@
785 @echo #undef HAS_STRTOULL>>$@
786 @echo #undef Size_t_size>>$@
787 @echo #undef IVTYPE>>$@
788 @echo #undef UVTYPE>>$@
789 @echo #undef IVSIZE>>$@
790 @echo #undef UVSIZE>>$@
791 @echo #undef NV_PRESERVES_UV>>$@
792 @echo #undef NV_PRESERVES_UV_BITS>>$@
793 @echo #undef IVdf>>$@
794 @echo #undef UVuf>>$@
795 @echo #undef UVof>>$@
796 @echo #undef UVxf>>$@
797 @echo #undef UVXf>>$@
798 @echo #undef USE_64_BIT_INT>>$@
799 @echo #undef Gconvert>>$@
800 @echo #undef HAS_FREXPL>>$@
801 @echo #undef HAS_ISNANL>>$@
802 @echo #undef HAS_MODFL>>$@
803 @echo #undef HAS_MODFL_PROTO>>$@
804 @echo #undef HAS_SQRTL>>$@
805 @echo #undef HAS_STRTOLD>>$@
806 @echo #undef PERL_PRIfldbl>>$@
807 @echo #undef PERL_PRIgldbl>>$@
808 @echo #undef PERL_PRIeldbl>>$@
809 @echo #undef PERL_SCNfldbl>>$@
810 @echo #undef NVTYPE>>$@
811 @echo #undef NVSIZE>>$@
812 @echo #undef LONG_DOUBLESIZE>>$@
813 @echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
814 @echo #undef NVef>>$@
815 @echo #undef NVff>>$@
816 @echo #undef NVgf>>$@
817 @echo #undef USE_LONG_DOUBLE>>$@
818 ifeq ($(USE_LARGE_FILES),define)
819 @echo #define Off_t $(INT64)>>$@
820 @echo #define LSEEKSIZE ^8>>$@
821 @echo #define Off_t_size ^8>>$@
823 @echo #define Off_t long>>$@
824 @echo #define LSEEKSIZE ^4>>$@
825 @echo #define Off_t_size ^4>>$@
827 ifeq ($(WIN64),define)
828 @echo #define PTRSIZE ^8>>$@
829 @echo #define SSize_t $(INT64)>>$@
830 @echo #define HAS_ATOLL>>$@
831 @echo #define HAS_STRTOLL>>$@
832 @echo #define HAS_STRTOULL>>$@
833 @echo #define Size_t_size ^8>>$@
835 @echo #define PTRSIZE ^4>>$@
836 @echo #define SSize_t int>>$@
837 @echo #undef HAS_ATOLL>>$@
838 @echo #undef HAS_STRTOLL>>$@
839 @echo #undef HAS_STRTOULL>>$@
840 @echo #define Size_t_size ^4>>$@
842 ifeq ($(USE_64_BIT_INT),define)
843 @echo #define IVTYPE $(INT64)>>$@
844 @echo #define UVTYPE unsigned $(INT64)>>$@
845 @echo #define IVSIZE ^8>>$@
846 @echo #define UVSIZE ^8>>$@
847 ifeq ($(USE_LONG_DOUBLE),define)
848 @echo #define NV_PRESERVES_UV>>$@
849 @echo #define NV_PRESERVES_UV_BITS 64>>$@
851 @echo #undef NV_PRESERVES_UV>>$@
852 @echo #define NV_PRESERVES_UV_BITS 53>>$@
854 @echo #define IVdf "I64d">>$@
855 @echo #define UVuf "I64u">>$@
856 @echo #define UVof "I64o">>$@
857 @echo #define UVxf "I64x">>$@
858 @echo #define UVXf "I64X">>$@
859 @echo #define USE_64_BIT_INT>>$@
861 @echo #define IVTYPE long>>$@
862 @echo #define UVTYPE unsigned long>>$@
863 @echo #define IVSIZE ^4>>$@
864 @echo #define UVSIZE ^4>>$@
865 @echo #define NV_PRESERVES_UV>>$@
866 @echo #define NV_PRESERVES_UV_BITS 32>>$@
867 @echo #define IVdf "ld">>$@
868 @echo #define UVuf "lu">>$@
869 @echo #define UVof "lo">>$@
870 @echo #define UVxf "lx">>$@
871 @echo #define UVXf "lX">>$@
872 @echo #undef USE_64_BIT_INT>>$@
874 ifeq ($(USE_LONG_DOUBLE),define)
875 @echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>>$@
876 @echo #define HAS_FREXPL>>$@
877 @echo #define HAS_ISNANL>>$@
878 @echo #define HAS_MODFL>>$@
879 @echo #define HAS_MODFL_PROTO>>$@
880 @echo #define HAS_SQRTL>>$@
881 @echo #define HAS_STRTOLD>>$@
882 @echo #define PERL_PRIfldbl "Lf">>$@
883 @echo #define PERL_PRIgldbl "Lg">>$@
884 @echo #define PERL_PRIeldbl "Le">>$@
885 @echo #define PERL_SCNfldbl "Lf">>$@
886 @echo #define NVTYPE long double>>$@
887 ifeq ($(WIN64),define)
888 @echo #define NVSIZE ^16>>$@
889 @echo #define LONG_DOUBLESIZE ^16>>$@
891 @echo #define NVSIZE ^12>>$@
892 @echo #define LONG_DOUBLESIZE ^12>>$@
894 @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>>$@
895 @echo #define NVef "Le">>$@
896 @echo #define NVff "Lf">>$@
897 @echo #define NVgf "Lg">>$@
898 @echo #define USE_LONG_DOUBLE>>$@
900 @echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>>$@
901 @echo #undef HAS_FREXPL>>$@
902 @echo #undef HAS_ISNANL>>$@
903 @echo #undef HAS_MODFL>>$@
904 @echo #undef HAS_MODFL_PROTO>>$@
905 @echo #undef HAS_SQRTL>>$@
906 @echo #undef HAS_STRTOLD>>$@
907 @echo #undef PERL_PRIfldbl>>$@
908 @echo #undef PERL_PRIgldbl>>$@
909 @echo #undef PERL_PRIeldbl>>$@
910 @echo #undef PERL_SCNfldbl>>$@
911 @echo #define NVTYPE double>>$@
912 @echo #define NVSIZE ^8>>$@
913 @echo #define LONG_DOUBLESIZE ^8>>$@
914 @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>>$@
915 @echo #define NVef "e">>$@
916 @echo #define NVff "f">>$@
917 @echo #define NVgf "g">>$@
918 @echo #undef USE_LONG_DOUBLE>>$@
922 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
923 cd .. && miniperl -Ilib make_patchnum.pl
925 # make sure that we recompile perl.c if the git version changes
926 ..\perl$(o) : ..\git_version.h
928 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
929 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
931 # This target is for when changes to the main config.sh happen.
932 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
933 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
934 # this target to regenerate config_H.gc.
936 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh
937 $(MINIPERL) -I..\lib ..\configpm --chdir=..
939 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
940 rename config.h $(CFGH_TMPL)
942 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
943 $(MINIPERL) -I..\lib ..\configpm --chdir=..
944 if exist lib\* $(RCOPY) "lib\*.*" ..\lib\$(NULL)
945 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
946 $(XCOPY) "*.h" $(COREDIR)\$(NULL)
947 $(RCOPY) include $(COREDIR)\$(NULL)
948 $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
949 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
951 # See the comment in Makefile.SH explaining this seemingly cranky ordering
952 $(MINIPERL) : ..\lib\buildcustomize.pl
954 ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
955 $(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
956 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
959 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
961 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
962 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
964 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
965 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
967 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
968 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
969 # unless the .IF is true), so instead we use a else with the default.
970 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
972 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
973 ifeq ($(USE_IMP_SYS),define)
974 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
976 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
979 # 1. we don't want to rebuild miniperl.exe when config.h changes
980 # 2. we don't want to rebuild miniperl.exe with non-default config.h
981 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
982 $(MINI_OBJ) : $(CORE_NOCFG_H)
984 $(WIN32_OBJ) : $(CORE_H)
986 $(CORE_OBJ) : $(CORE_H)
988 $(DLL_OBJ) : $(CORE_H)
990 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
991 $(MINIPERL) -I..\lib create_perllibst_h.pl
992 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
993 $(BUILDOPT) CCTYPE=GCC TARG_DIR=..\ > perldll.def
995 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
996 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
997 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES)
998 $(IMPLIB) --output-lib $(PERLIMPLIB) \
999 --dllname $(PERLDLL) \
1001 --base-file perl.base \
1002 --output-exp perl.exp
1003 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1004 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) perl.exp
1005 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1007 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1008 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1009 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1010 for %%i in ($(shell type Extensions_static)) do \
1011 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1012 $(ARCHPREFIX)ar x ..\%%i && \
1013 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1014 cd .. && rmdir /s /q $(STATICDIR)
1015 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1017 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1019 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1021 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1023 $(BITCOUNT_H) : $(GENUUDMAP)
1024 $(GENUUDMAP) $(GENERATED_HEADERS)
1026 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1028 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1029 $(LINK32) -o $@ $(BLINK_FLAGS) $(GENUUDMAP_OBJ) $(LIBFILES)
1031 perlmain.c : runperl.c
1032 copy runperl.c perlmain.c
1034 perlmain$(o) : perlmain.c
1035 $(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ -c perlmain.c
1037 perlmainst.c : runperl.c
1038 copy runperl.c perlmainst.c
1040 perlmainst$(o) : perlmainst.c
1041 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1043 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1044 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1045 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1046 copy $(PERLEXE) $(WPERLEXE)
1047 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1049 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1050 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1051 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1053 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1054 $(MINIPERL) -I..\lib ..\mkppport
1056 #-------------------------------------------------------------------------------
1057 # There's no direct way to mark a dependency on
1058 # DynaLoader.pm, so this will have to do
1059 Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1060 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1061 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1063 Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1064 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1065 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1067 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1068 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1069 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1070 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1072 Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1073 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1074 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1076 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1077 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1078 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1081 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1083 Extensions_realclean :
1084 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1086 #-------------------------------------------------------------------------------
1088 doc: $(PERLEXE) ..\pod\perltoc.pod
1089 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1090 --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
1093 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1094 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1096 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1097 # so please check that script before making structural changes here
1098 utils: $(PERLEXE) ..\utils\Makefile
1099 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1100 copy ..\README.aix ..\pod\perlaix.pod
1101 copy ..\README.amiga ..\pod\perlamiga.pod
1102 copy ..\README.android ..\pod\perlandroid.pod
1103 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1104 copy ..\README.ce ..\pod\perlce.pod
1105 copy ..\README.cn ..\pod\perlcn.pod
1106 copy ..\README.cygwin ..\pod\perlcygwin.pod
1107 copy ..\README.dos ..\pod\perldos.pod
1108 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1109 copy ..\README.haiku ..\pod\perlhaiku.pod
1110 copy ..\README.hpux ..\pod\perlhpux.pod
1111 copy ..\README.hurd ..\pod\perlhurd.pod
1112 copy ..\README.irix ..\pod\perlirix.pod
1113 copy ..\README.jp ..\pod\perljp.pod
1114 copy ..\README.ko ..\pod\perlko.pod
1115 copy ..\README.linux ..\pod\perllinux.pod
1116 copy ..\README.macos ..\pod\perlmacos.pod
1117 copy ..\README.macosx ..\pod\perlmacosx.pod
1118 copy ..\README.netware ..\pod\perlnetware.pod
1119 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1120 copy ..\README.os2 ..\pod\perlos2.pod
1121 copy ..\README.os390 ..\pod\perlos390.pod
1122 copy ..\README.os400 ..\pod\perlos400.pod
1123 copy ..\README.plan9 ..\pod\perlplan9.pod
1124 copy ..\README.qnx ..\pod\perlqnx.pod
1125 copy ..\README.riscos ..\pod\perlriscos.pod
1126 copy ..\README.solaris ..\pod\perlsolaris.pod
1127 copy ..\README.symbian ..\pod\perlsymbian.pod
1128 copy ..\README.synology ..\pod\perlsynology.pod
1129 copy ..\README.tru64 ..\pod\perltru64.pod
1130 copy ..\README.tw ..\pod\perltw.pod
1131 copy ..\README.vos ..\pod\perlvos.pod
1132 copy ..\README.win32 ..\pod\perlwin32.pod
1133 copy ..\pod\perldelta.pod ..\pod\perl5234delta.pod
1134 $(PERLEXE) $(PL2BAT) $(UTILS)
1135 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1136 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1138 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1139 $(PERLEXE) -f ..\pod\buildtoc -q
1141 # Note that the pod cleanup in this next section is parsed (and regenerated
1142 # by pod/buildtoc so please check that script before making changes here
1144 distclean: realclean
1145 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1146 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1147 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1148 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1149 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1150 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1151 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1152 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1153 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1154 -del /f $(LIBDIR)\File\Glob.pm
1155 -del /f $(LIBDIR)\Storable.pm
1156 -del /f $(LIBDIR)\Sys\Hostname.pm
1157 -del /f $(LIBDIR)\Time\HiRes.pm
1158 -del /f $(LIBDIR)\Unicode\Normalize.pm
1159 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1160 -del /f $(LIBDIR)\Win32.pm
1161 -del /f $(LIBDIR)\Win32CORE.pm
1162 -del /f $(LIBDIR)\Win32API\File.pm
1163 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1164 -del /f $(LIBDIR)\buildcustomize.pl
1165 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1167 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1168 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1169 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1170 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1171 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1172 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1173 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1174 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1175 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1176 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1177 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1178 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1179 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1180 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1181 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1182 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1183 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1184 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1185 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1186 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1187 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1188 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1189 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1190 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1191 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1192 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1193 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1194 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1195 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1196 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1197 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1198 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1199 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1200 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1201 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1202 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1203 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1204 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1205 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1206 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1207 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1208 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1209 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1210 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1211 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1212 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1213 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1214 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1215 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1216 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1217 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1218 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1219 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1220 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1221 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1222 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1223 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1224 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1225 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1226 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1227 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1228 perl5234delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1229 perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1230 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1231 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1232 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1233 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1234 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1235 perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1236 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1238 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1239 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
1240 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1241 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1244 -del /f ..\lib\Config_git.pl
1247 -del /f $(PERLEXE_RES) perl.base
1248 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1249 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1250 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1251 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1252 -del /s ..\utils\Makefile
1253 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1254 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1255 -if exist pod2htmd.tmp del pod2htmd.tmp
1256 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1257 -del /f ..\t\test_state
1259 install : all installbare installhtml
1261 installbare : utils ..\pod\perltoc.pod
1262 $(PERLEXE) ..\installperl
1263 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\$(NULL)
1264 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
1265 $(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
1266 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
1267 $(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
1270 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
1272 inst_lib : $(CONFIGPM)
1273 $(RCOPY) ..\lib $(INST_LIB)\$(NULL)
1275 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1276 cd ..\lib\unicore && \
1277 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
1279 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1280 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1281 if exist ..\t\perl.exe del /f ..\t\perl.exe
1282 rename ..\t\miniperl.exe perl.exe
1283 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1284 attrib -r "..\t\*.*"
1286 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1288 test-prep : all utils ..\pod\perltoc.pod
1289 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1290 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1291 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1292 # If building with gcc versions 4.x.x or greater, then
1293 # the GCC helper DLL will also need copied to the test directory.
1294 # The name of the dll can change, depending upon which vendor has supplied
1295 # your compiler, and upon the values of "x".
1296 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1297 # Without this copying, the op/taint.t test script will fail.
1298 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1299 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1300 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1301 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1302 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1305 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1306 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1308 test_porting : test-prep
1309 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1310 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1312 test-reonly : reonly utils
1313 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1314 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1315 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1317 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
1321 cd .. && regen.pl && cd win32
1323 test-notty : test-prep
1324 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1325 set PERL_SKIP_TTY_TEST=1 && \
1326 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1329 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1330 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1331 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1332 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1333 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1336 -@erase miniperlmain$(o)
1338 -@erase perlglob$(o)
1339 -@erase perlmain$(o)
1340 -@erase perlmainst$(o)
1343 -@erase /f ..\git_version.h
1347 -@erase $(PERLEXESTATIC)
1348 -@erase $(PERLSTATICLIB)
1351 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1352 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1353 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1354 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1355 -@erase $(UNIDATAFILES)
1356 -@erase $(WIN32_OBJ)
1358 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1359 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1362 -@erase Extensions_static
1364 clean : Extensions_clean _clean
1366 realclean : Extensions_realclean _clean
1368 # Handy way to run perlbug -ok without having to install and run the
1369 # installed perlbug. We don't re-run the tests here - we trust the user.
1370 # Please *don't* use this unless all tests pass.
1371 # If you want to report test failures, use "gmake nok" instead.
1373 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1376 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1379 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1382 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok