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
761 # Copy the template config.h and set configurables at the end of it
762 # as per the options chosen and compiler used.
763 # Note: This config.h is only used to build miniperl.exe anyway, but
764 # it's as well to have its options correct to be sure that it builds
765 # and so that it's "-V" options are correct for use by makedef.pl. The
766 # real config.h used to build perl.exe is generated from the top-level
767 # config_h.SH by config_h.PL (run by miniperl.exe).
769 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
771 copy $(CFGH_TMPL) config.h
773 @echo #ifndef _config_h_footer_>>$@
774 @echo #define _config_h_footer_>>$@
775 @echo #undef Off_t>>$@
776 @echo #undef LSEEKSIZE>>$@
777 @echo #undef Off_t_size>>$@
778 @echo #undef PTRSIZE>>$@
779 @echo #undef SSize_t>>$@
780 @echo #undef HAS_ATOLL>>$@
781 @echo #undef HAS_STRTOLL>>$@
782 @echo #undef HAS_STRTOULL>>$@
783 @echo #undef Size_t_size>>$@
784 @echo #undef IVTYPE>>$@
785 @echo #undef UVTYPE>>$@
786 @echo #undef IVSIZE>>$@
787 @echo #undef UVSIZE>>$@
788 @echo #undef NV_PRESERVES_UV>>$@
789 @echo #undef NV_PRESERVES_UV_BITS>>$@
790 @echo #undef IVdf>>$@
791 @echo #undef UVuf>>$@
792 @echo #undef UVof>>$@
793 @echo #undef UVxf>>$@
794 @echo #undef UVXf>>$@
795 @echo #undef USE_64_BIT_INT>>$@
796 @echo #undef Gconvert>>$@
797 @echo #undef HAS_FREXPL>>$@
798 @echo #undef HAS_ISNANL>>$@
799 @echo #undef HAS_MODFL>>$@
800 @echo #undef HAS_MODFL_PROTO>>$@
801 @echo #undef HAS_SQRTL>>$@
802 @echo #undef HAS_STRTOLD>>$@
803 @echo #undef PERL_PRIfldbl>>$@
804 @echo #undef PERL_PRIgldbl>>$@
805 @echo #undef PERL_PRIeldbl>>$@
806 @echo #undef PERL_SCNfldbl>>$@
807 @echo #undef NVTYPE>>$@
808 @echo #undef NVSIZE>>$@
809 @echo #undef LONG_DOUBLESIZE>>$@
810 @echo #undef NV_OVERFLOWS_INTEGERS_AT>>$@
811 @echo #undef NVef>>$@
812 @echo #undef NVff>>$@
813 @echo #undef NVgf>>$@
814 @echo #undef USE_LONG_DOUBLE>>$@
815 ifeq ($(USE_LARGE_FILES),define)
816 @echo #define Off_t $(INT64)>>$@
817 @echo #define LSEEKSIZE ^8>>$@
818 @echo #define Off_t_size ^8>>$@
820 @echo #define Off_t long>>$@
821 @echo #define LSEEKSIZE ^4>>$@
822 @echo #define Off_t_size ^4>>$@
824 ifeq ($(WIN64),define)
825 @echo #define PTRSIZE ^8>>$@
826 @echo #define SSize_t $(INT64)>>$@
827 @echo #define HAS_ATOLL>>$@
828 @echo #define HAS_STRTOLL>>$@
829 @echo #define HAS_STRTOULL>>$@
830 @echo #define Size_t_size ^8>>$@
832 @echo #define PTRSIZE ^4>>$@
833 @echo #define SSize_t int>>$@
834 @echo #undef HAS_ATOLL>>$@
835 @echo #undef HAS_STRTOLL>>$@
836 @echo #undef HAS_STRTOULL>>$@
837 @echo #define Size_t_size ^4>>$@
839 ifeq ($(USE_64_BIT_INT),define)
840 @echo #define IVTYPE $(INT64)>>$@
841 @echo #define UVTYPE unsigned $(INT64)>>$@
842 @echo #define IVSIZE ^8>>$@
843 @echo #define UVSIZE ^8>>$@
844 ifeq ($(USE_LONG_DOUBLE),define)
845 @echo #define NV_PRESERVES_UV>>$@
846 @echo #define NV_PRESERVES_UV_BITS 64>>$@
848 @echo #undef NV_PRESERVES_UV>>$@
849 @echo #define NV_PRESERVES_UV_BITS 53>>$@
851 @echo #define IVdf "I64d">>$@
852 @echo #define UVuf "I64u">>$@
853 @echo #define UVof "I64o">>$@
854 @echo #define UVxf "I64x">>$@
855 @echo #define UVXf "I64X">>$@
856 @echo #define USE_64_BIT_INT>>$@
858 @echo #define IVTYPE long>>$@
859 @echo #define UVTYPE unsigned long>>$@
860 @echo #define IVSIZE ^4>>$@
861 @echo #define UVSIZE ^4>>$@
862 @echo #define NV_PRESERVES_UV>>$@
863 @echo #define NV_PRESERVES_UV_BITS 32>>$@
864 @echo #define IVdf "ld">>$@
865 @echo #define UVuf "lu">>$@
866 @echo #define UVof "lo">>$@
867 @echo #define UVxf "lx">>$@
868 @echo #define UVXf "lX">>$@
869 @echo #undef USE_64_BIT_INT>>$@
871 ifeq ($(USE_LONG_DOUBLE),define)
872 @echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*""Lg",(n),(x))>>$@
873 @echo #define HAS_FREXPL>>$@
874 @echo #define HAS_ISNANL>>$@
875 @echo #define HAS_MODFL>>$@
876 @echo #define HAS_MODFL_PROTO>>$@
877 @echo #define HAS_SQRTL>>$@
878 @echo #define HAS_STRTOLD>>$@
879 @echo #define PERL_PRIfldbl "Lf">>$@
880 @echo #define PERL_PRIgldbl "Lg">>$@
881 @echo #define PERL_PRIeldbl "Le">>$@
882 @echo #define PERL_SCNfldbl "Lf">>$@
883 @echo #define NVTYPE long double>>$@
884 ifeq ($(WIN64),define)
885 @echo #define NVSIZE ^16>>$@
886 @echo #define LONG_DOUBLESIZE ^16>>$@
888 @echo #define NVSIZE ^12>>$@
889 @echo #define LONG_DOUBLESIZE ^12>>$@
891 @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>>$@
892 @echo #define NVef "Le">>$@
893 @echo #define NVff "Lf">>$@
894 @echo #define NVgf "Lg">>$@
895 @echo #define USE_LONG_DOUBLE>>$@
897 @echo #define Gconvert(x,n,t,b) sprintf((b),"%%.*g",(n),(x))>>$@
898 @echo #undef HAS_FREXPL>>$@
899 @echo #undef HAS_ISNANL>>$@
900 @echo #undef HAS_MODFL>>$@
901 @echo #undef HAS_MODFL_PROTO>>$@
902 @echo #undef HAS_SQRTL>>$@
903 @echo #undef HAS_STRTOLD>>$@
904 @echo #undef PERL_PRIfldbl>>$@
905 @echo #undef PERL_PRIgldbl>>$@
906 @echo #undef PERL_PRIeldbl>>$@
907 @echo #undef PERL_SCNfldbl>>$@
908 @echo #define NVTYPE double>>$@
909 @echo #define NVSIZE ^8>>$@
910 @echo #define LONG_DOUBLESIZE ^8>>$@
911 @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>>$@
912 @echo #define NVef "e">>$@
913 @echo #define NVff "f">>$@
914 @echo #define NVgf "g">>$@
915 @echo #undef USE_LONG_DOUBLE>>$@
919 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
920 cd .. && miniperl -Ilib make_patchnum.pl
922 # make sure that we recompile perl.c if the git version changes
923 ..\perl$(o) : ..\git_version.h
925 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
926 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
928 # This target is for when changes to the main config.sh happen.
929 # Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
930 # with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
931 # this target to regenerate config_H.gc.
933 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS)) $(CFGSH_TMPL) > ..\config.sh
934 $(MINIPERL) -I..\lib ..\configpm --chdir=..
936 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
937 rename config.h $(CFGH_TMPL)
939 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
940 $(MINIPERL) -I..\lib ..\configpm --chdir=..
941 if exist lib\* $(RCOPY) "lib\*.*" ..\lib\$(NULL)
942 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
943 $(XCOPY) "*.h" $(COREDIR)\$(NULL)
944 $(RCOPY) include $(COREDIR)\$(NULL)
945 $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
946 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
948 # See the comment in Makefile.SH explaining this seemingly cranky ordering
949 $(MINIPERL) : ..\lib\buildcustomize.pl
951 ..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
952 $(LINK32) -mconsole -o $(MINIPERL) $(BLINK_FLAGS) $(MINI_OBJ) $(LIBFILES)
953 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
956 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
958 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
959 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
961 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
962 $(CC) -c $(CFLAGS) $(MINIBUILDOPT) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
964 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
965 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
966 # unless the .IF is true), so instead we use a else with the default.
967 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
969 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
970 ifeq ($(USE_IMP_SYS),define)
971 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
973 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
976 # 1. we don't want to rebuild miniperl.exe when config.h changes
977 # 2. we don't want to rebuild miniperl.exe with non-default config.h
978 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
979 $(MINI_OBJ) : $(CORE_NOCFG_H)
981 $(WIN32_OBJ) : $(CORE_H)
983 $(CORE_OBJ) : $(CORE_H)
985 $(DLL_OBJ) : $(CORE_H)
987 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
988 $(MINIPERL) -I..\lib create_perllibst_h.pl
989 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
990 $(BUILDOPT) CCTYPE=GCC TARG_DIR=..\ > perldll.def
992 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
993 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
994 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES)
995 $(IMPLIB) --output-lib $(PERLIMPLIB) \
996 --dllname $(PERLDLL) \
998 --base-file perl.base \
999 --output-exp perl.exp
1000 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1001 $(PERLDLL_OBJ) $(shell type Extensions_static) $(LIBFILES) perl.exp
1002 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1004 $(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1005 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1006 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1007 for %%i in ($(shell type Extensions_static)) do \
1008 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1009 $(ARCHPREFIX)ar x ..\%%i && \
1010 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1011 cd .. && rmdir /s /q $(STATICDIR)
1012 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1014 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1016 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1018 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1020 $(BITCOUNT_H) : $(GENUUDMAP)
1021 $(GENUUDMAP) $(GENERATED_HEADERS)
1023 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1025 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1026 $(LINK32) -o $@ $(BLINK_FLAGS) $(GENUUDMAP_OBJ) $(LIBFILES)
1028 perlmain.c : runperl.c
1029 copy runperl.c perlmain.c
1031 perlmain$(o) : perlmain.c
1032 $(CC) $(subst -DPERLDLL,-UPERLDLL,$(CFLAGS_O)) $(OBJOUT_FLAG)$@ -c perlmain.c
1034 perlmainst.c : runperl.c
1035 copy runperl.c perlmainst.c
1037 perlmainst$(o) : perlmainst.c
1038 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1040 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1041 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1042 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1043 copy $(PERLEXE) $(WPERLEXE)
1044 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1046 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1047 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1048 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1050 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1051 $(MINIPERL) -I..\lib ..\mkppport
1053 #-------------------------------------------------------------------------------
1054 # There's no direct way to mark a dependency on
1055 # DynaLoader.pm, so this will have to do
1056 Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1057 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1058 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1060 Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1061 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1062 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1064 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1065 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1066 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1067 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1069 Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1070 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1071 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1073 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1074 $(XCOPY) "..\*.h" $(COREDIR)\$(NULL)
1075 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1078 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1080 Extensions_realclean :
1081 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1083 #-------------------------------------------------------------------------------
1085 doc: $(PERLEXE) ..\pod\perltoc.pod
1086 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1087 --podpath=pod:lib:utils --htmlroot="file://$(subst :,|,$(INST_HTML))"\
1090 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1091 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1093 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1094 # so please check that script before making structural changes here
1095 utils: $(PERLEXE) ..\utils\Makefile
1096 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1097 copy ..\README.aix ..\pod\perlaix.pod
1098 copy ..\README.amiga ..\pod\perlamiga.pod
1099 copy ..\README.android ..\pod\perlandroid.pod
1100 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1101 copy ..\README.ce ..\pod\perlce.pod
1102 copy ..\README.cn ..\pod\perlcn.pod
1103 copy ..\README.cygwin ..\pod\perlcygwin.pod
1104 copy ..\README.dos ..\pod\perldos.pod
1105 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1106 copy ..\README.haiku ..\pod\perlhaiku.pod
1107 copy ..\README.hpux ..\pod\perlhpux.pod
1108 copy ..\README.hurd ..\pod\perlhurd.pod
1109 copy ..\README.irix ..\pod\perlirix.pod
1110 copy ..\README.jp ..\pod\perljp.pod
1111 copy ..\README.ko ..\pod\perlko.pod
1112 copy ..\README.linux ..\pod\perllinux.pod
1113 copy ..\README.macos ..\pod\perlmacos.pod
1114 copy ..\README.macosx ..\pod\perlmacosx.pod
1115 copy ..\README.netware ..\pod\perlnetware.pod
1116 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1117 copy ..\README.os2 ..\pod\perlos2.pod
1118 copy ..\README.os390 ..\pod\perlos390.pod
1119 copy ..\README.os400 ..\pod\perlos400.pod
1120 copy ..\README.plan9 ..\pod\perlplan9.pod
1121 copy ..\README.qnx ..\pod\perlqnx.pod
1122 copy ..\README.riscos ..\pod\perlriscos.pod
1123 copy ..\README.solaris ..\pod\perlsolaris.pod
1124 copy ..\README.symbian ..\pod\perlsymbian.pod
1125 copy ..\README.synology ..\pod\perlsynology.pod
1126 copy ..\README.tru64 ..\pod\perltru64.pod
1127 copy ..\README.tw ..\pod\perltw.pod
1128 copy ..\README.vos ..\pod\perlvos.pod
1129 copy ..\README.win32 ..\pod\perlwin32.pod
1130 copy ..\pod\perldelta.pod ..\pod\perl5236delta.pod
1131 $(PERLEXE) $(PL2BAT) $(UTILS)
1132 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1133 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1135 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1136 $(PERLEXE) -f ..\pod\buildtoc -q
1138 # Note that the pod cleanup in this next section is parsed (and regenerated
1139 # by pod/buildtoc so please check that script before making changes here
1141 distclean: realclean
1142 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1143 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1144 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1145 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1146 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1147 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1148 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1149 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1150 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1151 -del /f $(LIBDIR)\File\Glob.pm
1152 -del /f $(LIBDIR)\Storable.pm
1153 -del /f $(LIBDIR)\Sys\Hostname.pm
1154 -del /f $(LIBDIR)\Time\HiRes.pm
1155 -del /f $(LIBDIR)\Unicode\Normalize.pm
1156 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1157 -del /f $(LIBDIR)\Win32.pm
1158 -del /f $(LIBDIR)\Win32CORE.pm
1159 -del /f $(LIBDIR)\Win32API\File.pm
1160 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1161 -del /f $(LIBDIR)\buildcustomize.pl
1162 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1164 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1165 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1166 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1167 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1168 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1169 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1170 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1171 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1172 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1173 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1174 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1175 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1176 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1177 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1178 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1179 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1180 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1181 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1182 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1183 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1184 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1185 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1186 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1187 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1188 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1189 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1190 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1191 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1192 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1193 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1194 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1195 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1196 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1197 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1198 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1199 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1200 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1201 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1202 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1203 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1204 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1205 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1206 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1207 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1208 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1209 -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1210 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1211 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1212 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1213 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1214 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1215 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1216 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1217 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1218 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1219 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1220 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1221 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1222 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1223 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1224 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1225 perl5236delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1226 perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1227 perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1228 perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1229 perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1230 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1231 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1232 perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1233 perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1235 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1236 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
1237 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1238 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1241 -del /f ..\lib\Config_git.pl
1244 -del /f $(PERLEXE_RES) perl.base
1245 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1246 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1247 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1248 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1249 -del /s ..\utils\Makefile
1250 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1251 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1252 -if exist pod2htmd.tmp del pod2htmd.tmp
1253 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1254 -del /f ..\t\test_state
1256 install : all installbare installhtml
1258 installbare : utils ..\pod\perltoc.pod
1259 $(PERLEXE) ..\installperl
1260 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\$(NULL)
1261 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\$(NULL)
1262 $(XCOPY) $(GLOBEXE) $(INST_BIN)\$(NULL)
1263 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\$(NULL)
1264 $(XCOPY) "bin\*.bat" $(INST_SCRIPT)\$(NULL)
1267 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\$(NULL)
1269 inst_lib : $(CONFIGPM)
1270 $(RCOPY) ..\lib $(INST_LIB)\$(NULL)
1272 $(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1273 cd ..\lib\unicore && \
1274 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
1276 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1277 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1278 if exist ..\t\perl.exe del /f ..\t\perl.exe
1279 rename ..\t\miniperl.exe perl.exe
1280 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1281 attrib -r "..\t\*.*"
1283 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1285 test-prep : all utils ..\pod\perltoc.pod
1286 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1287 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1288 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1289 # If building with gcc versions 4.x.x or greater, then
1290 # the GCC helper DLL will also need copied to the test directory.
1291 # The name of the dll can change, depending upon which vendor has supplied
1292 # your compiler, and upon the values of "x".
1293 # libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1294 # Without this copying, the op/taint.t test script will fail.
1295 if exist $(CCDLLDIR)\libgcc_s_seh-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_seh-1.dll ..\t\$(NULL)
1296 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1297 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1298 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1299 if exist $(CCDLLDIR)\libwinpthread-1.dll $(XCOPY) $(CCDLLDIR)\libwinpthread-1.dll ..\t\$(NULL)
1302 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1303 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1305 test_porting : test-prep
1306 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1307 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1309 test-reonly : reonly utils
1310 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1311 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1312 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1314 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
1318 cd .. && regen.pl && cd win32
1320 test-notty : test-prep
1321 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1322 set PERL_SKIP_TTY_TEST=1 && \
1323 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1326 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1327 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1328 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1329 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1330 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1333 -@erase miniperlmain$(o)
1335 -@erase perlglob$(o)
1336 -@erase perlmain$(o)
1337 -@erase perlmainst$(o)
1339 -@erase /f ..\git_version.h
1343 -@erase $(PERLEXESTATIC)
1344 -@erase $(PERLSTATICLIB)
1347 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1348 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1349 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1350 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1351 -@erase $(UNIDATAFILES)
1352 -@erase $(WIN32_OBJ)
1354 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1355 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1358 -@erase Extensions_static
1360 clean : Extensions_clean _clean
1362 realclean : Extensions_realclean _clean
1364 # Handy way to run perlbug -ok without having to install and run the
1365 # installed perlbug. We don't re-run the tests here - we trust the user.
1366 # Please *don't* use this unless all tests pass.
1367 # If you want to report test failures, use "gmake nok" instead.
1369 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1372 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1375 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1378 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok