This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add Intel C++ Compiler for Win32 support
[perl5.git] / win32 / makefile.mk
... / ...
CommitLineData
1#
2# Makefile to build perl on Windows using DMAKE.
3# Supported compilers:
4# Microsoft Visual C++ 6.0 or later
5# MinGW with gcc-3.2 or later
6# Windows SDK 64-bit compiler and tools
7#
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.
10#
11
12##
13## Make sure you read README.win32 *before* you mess with anything here!
14##
15
16#
17# Import everything from the environment like NMAKE does.
18#
19.IMPORT : .EVERYTHING
20
21##
22## Build configuration. Edit the values below to suit your needs.
23##
24
25#
26# Set these to wherever you want "dmake install" to put your
27# newly built perl.
28#
29INST_DRV *= c:
30INST_TOP *= $(INST_DRV)\perl
31
32#
33# Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
34# on a 64-bit version of Windows.
35#WIN64 *= undef
36
37#
38# Comment this out if you DON'T want your perl installation to be versioned.
39# This means that the new installation will overwrite any files from the
40# old installation at the same INST_TOP location. Leaving it enabled is
41# the safest route, as perl adds the extra version directory to all the
42# locations it installs files to. If you disable it, an alternative
43# versioned installation can be obtained by setting INST_TOP above to a
44# path that includes an arbitrary version string.
45#
46#INST_VER *= \5.19.6
47
48#
49# Comment this out if you DON'T want your perl installation to have
50# architecture specific components. This means that architecture-
51# specific files will be installed along with the architecture-neutral
52# files. Leaving it enabled is safer and more flexible, in case you
53# want to build multiple flavors of perl and install them together in
54# the same location. Commenting it out gives you a simpler
55# installation that is easier to understand for beginners.
56#
57#INST_ARCH *= \$(ARCHNAME)
58
59#
60# Uncomment this if you want perl to run
61# $Config{sitelibexp}\sitecustomize.pl
62# before anything else. This script can then be set up, for example,
63# to add additional entries to @INC.
64#
65#USE_SITECUST *= define
66
67#
68# uncomment to enable multiple interpreters. This is need for fork()
69# emulation and for thread support.
70#
71USE_MULTI *= define
72
73#
74# Interpreter cloning/threads; now reasonably complete.
75# This should be enabled to get the fork() emulation.
76# This needs USE_MULTI above.
77#
78USE_ITHREADS *= define
79
80#
81# uncomment to enable the implicit "host" layer for all system calls
82# made by perl. This needs USE_MULTI above.
83# This is also needed to get fork().
84#
85USE_IMP_SYS *= define
86
87#
88# Comment out next assign to disable perl's I/O subsystem and use compiler's
89# stdio for IO - depending on your compiler vendor and run time library you may
90# then get a number of fails from make test i.e. bugs - complain to them not us ;-).
91# You will also be unable to take full advantage of perl5.8's support for multiple
92# encodings and may see lower IO performance. You have been warned.
93USE_PERLIO *= define
94
95#
96# Comment this out if you don't want to enable large file support for
97# some reason. Should normally only be changed to maintain compatibility
98# with an older release of perl.
99USE_LARGE_FILES *= define
100
101#
102# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
103# (If you're building a 64-bit perl then you will have 64-bit integers whether
104# or not this is uncommented.)
105# Note: This option is not supported in 32-bit MSVC60 builds.
106#USE_64_BIT_INT *= define
107
108#
109# uncomment exactly one of the following
110#
111# Visual C++ 6.x (aka Visual C++ 98)
112#CCTYPE *= MSVC60
113# Visual C++ .NET 2002/2003 (aka Visual C++ 7.x) (full version)
114#CCTYPE *= MSVC70
115# Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
116#CCTYPE *= MSVC70FREE
117# Windows Server 2003 SP1 Platform SDK (April 2005)
118#CCTYPE = SDK2003SP1
119# Visual C++ 2005 (aka Visual C++ 8.x) (full version)
120#CCTYPE *= MSVC80
121# Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
122#CCTYPE *= MSVC80FREE
123# Visual C++ 2008 (aka Visual C++ 9.x) (full version)
124#CCTYPE *= MSVC90
125# Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
126#CCTYPE *= MSVC90FREE
127# Visual C++ 2010 (aka Visual C++ 10.x) (full version)
128#CCTYPE = MSVC100
129# Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version)
130#CCTYPE = MSVC100FREE
131# Visual C++ 2012 (aka Visual C++ 11.x) (full version)
132#CCTYPE = MSVC110
133# Visual C++ 2012 Express Edition (aka Visual C++ 11.x) (free version)
134#CCTYPE = MSVC110FREE
135# Visual C++ 2013 (aka Visual C++ 12.x) (full version)
136#CCTYPE = MSVC120
137# Visual C++ 2013 Express Edition (aka Visual C++ 12.x) (free version)
138#CCTYPE = MSVC120FREE
139# MinGW or mingw-w64 with gcc-3.2 or later
140CCTYPE *= GCC
141
142#
143# uncomment next line if you want debug version of perl (big,slow)
144# If not enabled, we automatically try to use maximum optimization
145# with all compilers that are known to have a working optimizer.
146#
147#CFG *= Debug
148
149#
150# uncomment to enable linking with setargv.obj under the Visual C
151# compiler. Setting this options enables perl to expand wildcards in
152# arguments, but it may be harder to use alternate methods like
153# File::DosGlob that are more powerful. This option is supported only with
154# Visual C.
155#
156#USE_SETARGV *= define
157
158#
159# set this if you wish to use perl's malloc
160# WARNING: Turning this on/off WILL break binary compatibility with extensions
161# you may have compiled with/without it. Be prepared to recompile all
162# extensions if you change the default. Currently, this cannot be enabled
163# if you ask for USE_IMP_SYS above.
164#
165#PERL_MALLOC *= define
166
167#
168# set this to enable debugging mstats
169# This must be enabled to use the Devel::Peek::mstat() function. This cannot
170# be enabled without PERL_MALLOC as well.
171#
172#DEBUG_MSTATS *= define
173
174#
175# set this to additionally provide a statically linked perl-static.exe.
176# Note that dynamic loading will not work with this perl, so you must
177# include required modules statically using the STATIC_EXT or ALL_STATIC
178# variables below. A static library perl519s.lib will also be created.
179# Ordinary perl.exe is not affected by this option.
180#
181#BUILD_STATIC *= define
182
183#
184# in addition to BUILD_STATIC the option ALL_STATIC makes *every*
185# extension get statically built
186# This will result in a very large perl executable, but the main purpose
187# is to have proper linking set so as to be able to create miscellaneous
188# executables with different built-in extensions
189#
190#ALL_STATIC *= define
191
192#
193# set the install locations of the compiler include/libraries
194# Running VCVARS32.BAT is *required* when using Visual C.
195# Some versions of Visual C don't define MSVCDIR in the environment,
196# so you may have to set CCHOME explicitly (spaces in the path name should
197# not be quoted)
198#
199.IF "$(CCTYPE)" == "GCC"
200CCHOME *= C:\MinGW
201.ELSE
202CCHOME *= $(MSVCDIR)
203.ENDIF
204
205#
206# uncomment this if you are using x86_64-w64-mingw32 cross-compiler
207# ie if your gcc executable is called 'x86_64-w64-mingw32-gcc'
208# instead of the usual 'gcc'.
209#
210#GCCCROSS *= define
211
212#
213# Following sets $Config{incpath} and $Config{libpth}
214#
215
216.IF "$(GCCCROSS)" == "define"
217CCINCDIR *= $(CCHOME)\x86_64-w64-mingw32\include
218CCLIBDIR *= $(CCHOME)\x86_64-w64-mingw32\lib
219CCDLLDIR *= $(CCLIBDIR)
220.ELSE
221CCINCDIR *= $(CCHOME)\include
222CCLIBDIR *= $(CCHOME)\lib
223CCDLLDIR *= $(CCHOME)\bin
224.ENDIF
225
226#
227# Additional compiler flags can be specified here.
228#
229BUILDOPT *= $(BUILDOPTEXTRA)
230
231#
232# This should normally be disabled. Enabling it will disable the File::Glob
233# implementation of CORE::glob.
234#
235#BUILDOPT += -DPERL_EXTERNAL_GLOB
236
237#
238# Perl needs to read scripts in text mode so that the DATA filehandle
239# works correctly with seek() and tell(), or around auto-flushes of
240# all filehandles (e.g. by system(), backticks, fork(), etc).
241#
242# The current version on the ByteLoader module on CPAN however only
243# works if scripts are read in binary mode. But before you disable text
244# mode script reading (and break some DATA filehandle functionality)
245# please check first if an updated ByteLoader isn't available on CPAN.
246#
247BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
248
249#
250# specify semicolon-separated list of extra directories that modules will
251# look for libraries (spaces in path names need not be quoted)
252#
253EXTRALIBDIRS *=
254
255#
256# set this to point to cmd.exe (only needed if you use some
257# alternate shell that doesn't grok cmd.exe style commands)
258#
259#SHELL *= g:\winnt\system32\cmd.exe
260
261#
262# set this to your email address (perl will guess a value from
263# from your loginname and your hostname, which may not be right)
264#
265#EMAIL *=
266
267##
268## Build configuration ends.
269##
270
271##################### CHANGE THESE ONLY IF YOU MUST #####################
272
273PERL_MALLOC *= undef
274DEBUG_MSTATS *= undef
275
276USE_SITECUST *= undef
277USE_MULTI *= undef
278USE_ITHREADS *= undef
279USE_IMP_SYS *= undef
280USE_PERLIO *= undef
281USE_LARGE_FILES *= undef
282USE_64_BIT_INT *= undef
283
284.IF "$(USE_IMP_SYS)" == "define"
285PERL_MALLOC = undef
286.ENDIF
287
288.IF "$(PERL_MALLOC)" == "undef"
289DEBUG_MSTATS = undef
290.ENDIF
291
292.IF "$(DEBUG_MSTATS)" == "define"
293BUILDOPT += -DPERL_DEBUGGING_MSTATS
294.ENDIF
295
296.IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
297USE_MULTI != define
298.ENDIF
299
300.IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
301USE_MULTI != define
302.ENDIF
303
304.IF "$(USE_SITECUST)" == "define"
305BUILDOPT += -DUSE_SITECUSTOMIZE
306.ENDIF
307
308.IF "$(USE_MULTI)" != "undef"
309BUILDOPT += -DPERL_IMPLICIT_CONTEXT
310.ENDIF
311
312.IF "$(USE_IMP_SYS)" != "undef"
313BUILDOPT += -DPERL_IMPLICIT_SYS
314.ENDIF
315
316PROCESSOR_ARCHITECTURE *= x86
317
318.IF "$(WIN64)" == ""
319# When we are running from a 32bit cmd.exe on AMD64 then
320# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
321# is set to AMD64
322.IF "$(PROCESSOR_ARCHITEW6432)" != ""
323PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
324WIN64 = define
325.ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
326WIN64 = define
327.ELSE
328WIN64 = undef
329.ENDIF
330.ENDIF
331
332.IF "$(WIN64)" == "define"
333USE_64_BIT_INT = define
334.ENDIF
335
336# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
337# both link against MSVCRT.dll (which is part of Windows itself) and
338# not against a compiler specific versioned runtime.
339.IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
340CCTYPE = SDK2003SP1
341.ENDIF
342
343# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
344# does not support it.
345.IF "$(CCTYPE)" == "MSVC60"
346USE_64_BIT_INT != undef
347.ENDIF
348
349ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
350.IF "$(ARCHITECTURE)" == "AMD64"
351ARCHITECTURE = x64
352.ENDIF
353.IF "$(ARCHITECTURE)" == "IA64"
354ARCHITECTURE = ia64
355.ENDIF
356
357.IF "$(USE_MULTI)" == "define"
358ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
359.ELSE
360.IF "$(USE_PERLIO)" == "define"
361ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
362.ELSE
363ARCHNAME = MSWin32-$(ARCHITECTURE)
364.ENDIF
365.ENDIF
366
367.IF "$(USE_PERLIO)" == "define"
368BUILDOPT += -DUSE_PERLIO
369.ENDIF
370
371.IF "$(USE_ITHREADS)" == "define"
372ARCHNAME !:= $(ARCHNAME)-thread
373.ENDIF
374
375.IF "$(WIN64)" != "define"
376.IF "$(USE_64_BIT_INT)" == "define"
377ARCHNAME !:= $(ARCHNAME)-64int
378.ENDIF
379.ENDIF
380
381ARCHDIR = ..\lib\$(ARCHNAME)
382COREDIR = ..\lib\CORE
383AUTODIR = ..\lib\auto
384LIBDIR = ..\lib
385EXTDIR = ..\ext
386DISTDIR = ..\dist
387CPANDIR = ..\cpan
388PODDIR = ..\pod
389HTMLDIR = .\html
390
391#
392INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
393INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
394INST_LIB = $(INST_TOP)$(INST_VER)\lib
395INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
396INST_COREDIR = $(INST_ARCHLIB)\CORE
397INST_HTML = $(INST_TOP)$(INST_VER)\html
398
399#
400# Programs to compile, build .lib files and link
401#
402
403.USESHELL :
404
405.IF "$(CCTYPE)" == "GCC"
406
407.IF "$(GCCCROSS)" == "define"
408ARCHPREFIX = x86_64-w64-mingw32-
409.ENDIF
410
411CC = $(ARCHPREFIX)gcc
412LINK32 = $(ARCHPREFIX)g++
413LIB32 = $(ARCHPREFIX)ar rc
414IMPLIB = $(ARCHPREFIX)dlltool
415RSC = $(ARCHPREFIX)windres
416
417i = .i
418o = .o
419a = .a
420
421#
422# Options
423#
424
425INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
426DEFINES = -DWIN32
427.IF "$(WIN64)" == "define"
428DEFINES += -DWIN64 -DCONSERVATIVE
429.ENDIF
430LOCDEFS = -DPERLDLL -DPERL_CORE
431SUBSYS = console
432CXX_FLAG = -xc++
433
434# Current releases of MinGW 5.1.4 (as of 11-Aug-2009) will fail to link
435# correctly if -lmsvcrt is specified explicitly.
436LIBC =
437#LIBC = -lmsvcrt
438
439# same libs as MSVC
440LIBFILES = $(LIBC) \
441 -lmoldname -lkernel32 -luser32 -lgdi32 \
442 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
443 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
444 -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
445
446.IF "$(CFG)" == "Debug"
447OPTIMIZE = -g -O2 -DDEBUGGING
448LINK_DBG = -g
449.ELSE
450OPTIMIZE = -s -O2
451LINK_DBG = -s
452.ENDIF
453
454EXTRACFLAGS =
455CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
456LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
457OBJOUT_FLAG = -o
458EXEOUT_FLAG = -o
459LIBOUT_FLAG =
460
461BUILDOPT += -fno-strict-aliasing -mms-bitfields
462
463.ELSE
464
465# All but the free version of VC++ 7.x can load DLLs on demand. Makes the test
466# suite run in about 10% less time.
467.IF "$(CCTYPE)" != "MSVC70FREE"
468DELAYLOAD = -DELAYLOAD:ws2_32.dll delayimp.lib
469.ENDIF
470
471# Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
472# DLLs. These either need copying everywhere with the binaries, or else need
473# embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
474# simplicity, embed them if they exist (and delete them afterwards so that they
475# don't get installed too).
476EMBED_EXE_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
477 if exist $@.manifest del $@.manifest
478EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
479 if exist $@.manifest del $@.manifest
480
481# Most relevant compiler-specific options fall into two groups:
482# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
483.IF "$(CCTYPE)" == "MSVC60" || \
484 "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
485PREMSVC80 = define
486.ELSE
487PREMSVC80 = undef
488.ENDIF
489
490CC = cl
491LINK32 = link
492LIB32 = $(LINK32) -lib
493RSC = rc
494
495#
496# Options
497#
498
499INCLUDES = -I$(COREDIR) -I.\include -I. -I..
500#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
501DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT
502LOCDEFS = -DPERLDLL -DPERL_CORE
503SUBSYS = console
504CXX_FLAG = -TP -EHsc
505
506LIBC = msvcrt.lib
507
508.IF "$(CFG)" == "Debug"
509OPTIMIZE = -Od -MD -Zi -DDEBUGGING
510LINK_DBG = -debug
511.ELSE
512# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
513OPTIMIZE = -O1 -MD -Zi -DNDEBUG
514# we enable debug symbols in release builds also
515LINK_DBG = -debug -opt:ref,icf
516# you may want to enable this if you want COFF symbols in the executables
517# in addition to the PDB symbols. The default Dr. Watson that ships with
518# Windows can use the the former but not latter. The free WinDbg can be
519# installed to get better stack traces from just the PDB symbols, so we
520# avoid the bloat of COFF symbols by default.
521#LINK_DBG = $(LINK_DBG) -debugtype:both
522.IF "$(CCTYPE)" != "MSVC60"
523# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
524OPTIMIZE += -GL
525LINK_DBG += -ltcg
526LIB_FLAGS = -ltcg
527.ENDIF
528.ENDIF
529
530.IF "$(WIN64)" == "define"
531DEFINES += -DWIN64 -DCONSERVATIVE
532OPTIMIZE += -fp:precise
533.ENDIF
534
535# For now, silence warnings from VC++ 8.x onwards about "unsafe" CRT functions
536# and POSIX CRT function names being deprecated.
537.IF "$(PREMSVC80)" == "undef"
538DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
539.ENDIF
540
541# In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
542# 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
543# preprocessor option to revert back to the old functionality for
544# backward compatibility. We define this symbol here for older 32-bit
545# compilers only (which aren't using it at all) for the sole purpose
546# of getting it into $Config{ccflags}. That way if someone builds
547# Perl itself with e.g. VC6 but later installs an XS module using VC8
548# the time_t types will still be compatible.
549.IF "$(WIN64)" == "undef"
550.IF "$(PREMSVC80)" == "define"
551BUILDOPT += -D_USE_32BIT_TIME_T
552.ENDIF
553.ENDIF
554
555LIBBASEFILES = \
556 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
557 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
558 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
559 version.lib odbc32.lib odbccp32.lib comctl32.lib
560
561# The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
562# doesn't include the buffer overrun verification code used by the /GS switch.
563# Since the code links against libraries that are compiled with /GS, this
564# "security cookie verification" code must be included via bufferoverflow.lib.
565.IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
566LIBBASEFILES += bufferoverflowU.lib
567.ENDIF
568
569LIBFILES = $(LIBBASEFILES) $(LIBC)
570
571EXTRACFLAGS = -nologo -GF -W3
572CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
573 $(PCHFLAGS) $(OPTIMIZE)
574LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
575 -libpath:"$(INST_COREDIR)" \
576 -machine:$(PROCESSOR_ARCHITECTURE)
577LIB_FLAGS = $(LIB_FLAGS) -nologo
578OBJOUT_FLAG = -Fo
579EXEOUT_FLAG = -Fe
580LIBOUT_FLAG = /out:
581
582.ENDIF
583
584CFLAGS_O = $(CFLAGS) $(BUILDOPT)
585
586.IF "$(PREMSVC80)" == "undef"
587LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
588.ELSE
589RSC_FLAGS = -DINCLUDE_MANIFEST
590.ENDIF
591
592
593# used to allow local linking flags that are not propogated into Config.pm,
594# currently unused
595# -- BKS, 12-12-1999
596PRIV_LINK_FLAGS *=
597BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
598
599#################### do not edit below this line #######################
600############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
601
602# Some old dmakes (including Sarathy's one at
603# http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
604# don't support logical OR (||) or logical AND (&&) in conditional
605# expressions and hence don't process this makefile correctly. Determine
606# whether this is the case so that we can give the user an error message.
607.IF 1 == 1 || 1 == 1
608NEWDMAKE = define
609.ELSE
610NEWDMAKE = undef
611.ENDIF
612
613o *= .obj
614a *= .lib
615
616LKPRE = INPUT (
617LKPOST = )
618
619#
620# Rules
621#
622
623.SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
624
625.c$(o):
626 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
627
628.c.i:
629 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
630
631.y.c:
632 $(NOOP)
633
634$(o).dll:
635.IF "$(CCTYPE)" == "GCC"
636 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
637 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
638.ELSE
639 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
640 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
641 $(EMBED_DLL_MANI)
642.ENDIF
643
644.rc.res:
645.IF "$(CCTYPE)" == "GCC"
646 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -D INCLUDE_MANIFEST -i $< -o $@
647.ELSE
648 $(RSC) -i.. -DINCLUDE_MANIFEST $<
649.ENDIF
650
651#
652# various targets
653MINIPERL = ..\miniperl.exe
654MINIDIR = .\mini
655PERLEXE = ..\perl.exe
656WPERLEXE = ..\wperl.exe
657PERLEXESTATIC = ..\perl-static.exe
658STATICDIR = .\static.tmp
659GLOBEXE = ..\perlglob.exe
660CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
661X2P = ..\x2p\a2p.exe
662GENUUDMAP = ..\generate_uudmap.exe
663.IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
664PERLSTATIC = static
665.ELSE
666PERLSTATIC =
667.ENDIF
668
669# Unicode data files generated by mktables
670UNIDATAFILES = ..\lib\unicore\Decomposition.pl ..\lib\unicore\TestProp.pl \
671 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
672 ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
673 ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst
674
675# Directories of Unicode data files generated by mktables
676UNIDATADIR1 = ..\lib\unicore\To
677UNIDATADIR2 = ..\lib\unicore\lib
678
679PERLEXE_MANIFEST= .\perlexe.manifest
680PERLEXE_ICO = .\perlexe.ico
681PERLEXE_RES = .\perlexe.res
682PERLDLL_RES =
683
684# Nominate a target which causes extensions to be re-built
685# This used to be $(PERLEXE), but at worst it is the .dll that they depend
686# on and really only the interface - i.e. the .def file used to export symbols
687# from the .dll
688PERLDEP = perldll.def
689
690
691PL2BAT = bin\pl2bat.pl
692
693UTILS = \
694 ..\utils\h2ph \
695 ..\utils\splain \
696 ..\utils\perlbug \
697 ..\utils\pl2pm \
698 ..\utils\c2ph \
699 ..\utils\pstruct \
700 ..\utils\h2xs \
701 ..\utils\perldoc \
702 ..\utils\perlivp \
703 ..\utils\libnetcfg \
704 ..\utils\enc2xs \
705 ..\utils\piconv \
706 ..\utils\config_data \
707 ..\utils\corelist \
708 ..\utils\cpan \
709 ..\utils\xsubpp \
710 ..\utils\pod2html \
711 ..\utils\prove \
712 ..\utils\ptar \
713 ..\utils\ptardiff \
714 ..\utils\ptargrep \
715 ..\utils\zipdetails \
716 ..\utils\shasum \
717 ..\utils\instmodsh \
718 ..\utils\json_pp \
719 ..\x2p\find2perl \
720 ..\x2p\psed \
721 ..\x2p\s2p \
722 bin\exetype.pl \
723 bin\runperl.pl \
724 bin\pl2bat.pl \
725 bin\perlglob.pl \
726 bin\search.pl
727
728.IF "$(CCTYPE)" == "GCC"
729
730CFGSH_TMPL = config.gc
731CFGH_TMPL = config_H.gc
732PERLIMPLIB = ..\libperl519$(a)
733PERLSTATICLIB = ..\libperl519s$(a)
734INT64 = long long
735INT64f = ll
736
737.ELSE
738
739CFGSH_TMPL = config.vc
740CFGH_TMPL = config_H.vc
741INT64 = __int64
742INT64f = I64
743
744.ENDIF
745
746# makedef.pl must be updated if this changes, and this should normally
747# only change when there is an incompatible revision of the public API.
748PERLIMPLIB *= ..\perl519$(a)
749PERLSTATICLIB *= ..\perl519s$(a)
750PERLDLL = ..\perl519.dll
751
752XCOPY = xcopy /f /r /i /d /y
753RCOPY = xcopy /f /r /i /e /d /y
754NOOP = @rem
755
756MICROCORE_SRC = \
757 ..\av.c \
758 ..\caretx.c \
759 ..\deb.c \
760 ..\doio.c \
761 ..\doop.c \
762 ..\dump.c \
763 ..\globals.c \
764 ..\gv.c \
765 ..\mro.c \
766 ..\hv.c \
767 ..\locale.c \
768 ..\keywords.c \
769 ..\mathoms.c \
770 ..\mg.c \
771 ..\numeric.c \
772 ..\op.c \
773 ..\pad.c \
774 ..\perl.c \
775 ..\perlapi.c \
776 ..\perly.c \
777 ..\pp.c \
778 ..\pp_ctl.c \
779 ..\pp_hot.c \
780 ..\pp_pack.c \
781 ..\pp_sort.c \
782 ..\pp_sys.c \
783 ..\reentr.c \
784 ..\regcomp.c \
785 ..\regexec.c \
786 ..\run.c \
787 ..\scope.c \
788 ..\sv.c \
789 ..\taint.c \
790 ..\toke.c \
791 ..\universal.c \
792 ..\utf8.c \
793 ..\util.c
794
795EXTRACORE_SRC += perllib.c
796
797.IF "$(PERL_MALLOC)" == "define"
798EXTRACORE_SRC += ..\malloc.c
799.ENDIF
800
801EXTRACORE_SRC += ..\perlio.c
802
803WIN32_SRC = \
804 .\win32.c \
805 .\win32sck.c \
806 .\win32thread.c \
807 .\fcrypt.c
808
809# We need this for miniperl build unless we override canned
810# config.h #define building mini\*
811#.IF "$(USE_PERLIO)" == "define"
812WIN32_SRC += .\win32io.c
813#.ENDIF
814
815X2P_SRC = \
816 ..\x2p\a2p.c \
817 ..\x2p\hash.c \
818 ..\x2p\str.c \
819 ..\x2p\util.c \
820 ..\x2p\walk.c
821
822CORE_NOCFG_H = \
823 ..\av.h \
824 ..\cop.h \
825 ..\cv.h \
826 ..\dosish.h \
827 ..\embed.h \
828 ..\form.h \
829 ..\gv.h \
830 ..\handy.h \
831 ..\hv.h \
832 ..\hv_func.h \
833 ..\iperlsys.h \
834 ..\mg.h \
835 ..\nostdio.h \
836 ..\op.h \
837 ..\opcode.h \
838 ..\perl.h \
839 ..\perlapi.h \
840 ..\perlsdio.h \
841 ..\perlsfio.h \
842 ..\perly.h \
843 ..\pp.h \
844 ..\proto.h \
845 ..\regcomp.h \
846 ..\regexp.h \
847 ..\scope.h \
848 ..\sv.h \
849 ..\thread.h \
850 ..\unixish.h \
851 ..\utf8.h \
852 ..\util.h \
853 ..\warnings.h \
854 ..\XSUB.h \
855 ..\EXTERN.h \
856 ..\perlvars.h \
857 ..\intrpvar.h \
858 .\include\dirent.h \
859 .\include\netdb.h \
860 .\include\sys\errno2.h \
861 .\include\sys\socket.h \
862 .\win32.h
863
864CORE_H = $(CORE_NOCFG_H) .\config.h ..\git_version.h
865
866UUDMAP_H = ..\uudmap.h
867BITCOUNT_H = ..\bitcount.h
868MG_DATA_H = ..\mg_data.h
869GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
870
871MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
872CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
873WIN32_OBJ = $(WIN32_SRC:db:+$(o))
874MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
875MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
876MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
877DLL_OBJ = $(DYNALOADER)
878X2P_OBJ = $(X2P_SRC:db:+$(o))
879GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
880
881PERLDLL_OBJ = $(CORE_OBJ)
882PERLEXE_OBJ = perlmain$(o)
883PERLEXEST_OBJ = perlmainst$(o)
884
885PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
886
887.IF "$(USE_SETARGV)" != ""
888SETARGV_OBJ = setargv$(o)
889.ENDIF
890
891.IF "$(ALL_STATIC)" == "define"
892# some exclusions, unfortunately, until fixed:
893# - MakeMaker isn't capable enough for SDBM_File (small bug)
894STATIC_EXT = * !SDBM_File
895.ELSE
896# specify static extensions here, for example:
897# (be sure to include Win32CORE to load Win32 on demand)
898#STATIC_EXT = Win32CORE Cwd Compress/Raw/Zlib
899STATIC_EXT = Win32CORE
900.ENDIF
901
902DYNALOADER = ..\DynaLoader$(o)
903
904# vars must be separated by "\t+~\t+", since we're using the tempfile
905# version of config_sh.pl (we were overflowing someone's buffer by
906# trying to fit them all on the command line)
907# -- BKS 10-17-1999
908CFG_VARS = \
909 INST_TOP=$(INST_TOP) ~ \
910 INST_VER=$(INST_VER) ~ \
911 INST_ARCH=$(INST_ARCH) ~ \
912 archname=$(ARCHNAME) ~ \
913 cc=$(CC) ~ \
914 ld=$(LINK32) ~ \
915 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
916 cf_email=$(EMAIL) ~ \
917 d_mymalloc=$(PERL_MALLOC) ~ \
918 libs=$(LIBFILES:f) ~ \
919 incpath=$(CCINCDIR) ~ \
920 libperl=$(PERLIMPLIB:f) ~ \
921 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
922 libc=$(LIBC) ~ \
923 make=dmake ~ \
924 _o=$(o) ~ \
925 obj_ext=$(o) ~ \
926 _a=$(a) ~ \
927 lib_ext=$(a) ~ \
928 static_ext=$(STATIC_EXT) ~ \
929 usethreads=$(USE_ITHREADS) ~ \
930 useithreads=$(USE_ITHREADS) ~ \
931 usemultiplicity=$(USE_MULTI) ~ \
932 useperlio=$(USE_PERLIO) ~ \
933 use64bitint=$(USE_64_BIT_INT) ~ \
934 uselargefiles=$(USE_LARGE_FILES) ~ \
935 usesitecustomize=$(USE_SITECUST) ~ \
936 LINK_FLAGS=$(LINK_FLAGS) ~ \
937 optimize=$(OPTIMIZE) ~ \
938 ARCHPREFIX=$(ARCHPREFIX) ~ \
939 WIN64=$(WIN64)
940
941#
942# Top targets
943#
944
945all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
946 $(CONFIGPM) $(UNIDATAFILES) MakePPPort \
947 $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC)
948
949regnodes : ..\regnodes.h
950
951..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
952
953..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
954
955reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) \
956 $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
957 $(X2P) Extensions_reonly
958
959static: $(PERLEXESTATIC)
960
961#----------------------------------------------------------------
962
963CHECKDMAKE :
964.IF "$(NEWDMAKE)" == "define"
965 $(NOOP)
966.ELSE
967 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
968 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
969 @exit 1
970.ENDIF
971
972$(GLOBEXE) : perlglob$(o)
973.IF "$(CCTYPE)" == "GCC"
974 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
975.ELSE
976 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
977 perlglob$(o) setargv$(o)
978 $(EMBED_EXE_MANI)
979.ENDIF
980
981perlglob$(o) : perlglob.c
982
983config.w32 : $(CFGSH_TMPL)
984 copy $(CFGSH_TMPL) config.w32
985
986#
987# Copy the template config.h and set configurables at the end of it
988# as per the options chosen and compiler used.
989# Note: This config.h is only used to build miniperl.exe anyway, but
990# it's as well to have its options correct to be sure that it builds
991# and so that it's "-V" options are correct for use by makedef.pl. The
992# real config.h used to build perl.exe is generated from the top-level
993# config_h.SH by config_h.PL (run by miniperl.exe).
994#
995.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
996 -del /f config.h
997 copy $(CFGH_TMPL) config.h
998 @echo.>>$@
999 @echo #ifndef _config_h_footer_>>$@
1000 @echo #define _config_h_footer_>>$@
1001 @echo #undef PTRSIZE>>$@
1002 @echo #undef SSize_t>>$@
1003 @echo #undef HAS_ATOLL>>$@
1004 @echo #undef HAS_STRTOLL>>$@
1005 @echo #undef HAS_STRTOULL>>$@
1006 @echo #undef IVTYPE>>$@
1007 @echo #undef UVTYPE>>$@
1008 @echo #undef IVSIZE>>$@
1009 @echo #undef UVSIZE>>$@
1010 @echo #undef NV_PRESERVES_UV>>$@
1011 @echo #undef NV_PRESERVES_UV_BITS>>$@
1012 @echo #undef IVdf>>$@
1013 @echo #undef UVuf>>$@
1014 @echo #undef UVof>>$@
1015 @echo #undef UVxf>>$@
1016 @echo #undef UVXf>>$@
1017 @echo #undef USE_64_BIT_INT>>$@
1018 @echo #undef Size_t_size>>$@
1019.IF "$(WIN64)"=="define"
1020 @echo #define PTRSIZE ^8>>$@
1021 @echo #define SSize_t $(INT64)>>$@
1022 @echo #define HAS_ATOLL>>$@
1023 @echo #define HAS_STRTOLL>>$@
1024 @echo #define HAS_STRTOULL>>$@
1025 @echo #define Size_t_size ^8>>$@
1026.ELSE
1027 @echo #define PTRSIZE ^4>>$@
1028 @echo #define SSize_t int>>$@
1029 @echo #undef HAS_ATOLL>>$@
1030 @echo #undef HAS_STRTOLL>>$@
1031 @echo #undef HAS_STRTOULL>>$@
1032 @echo #define Size_t_size ^4>>$@
1033.ENDIF
1034.IF "$(USE_64_BIT_INT)"=="define"
1035 @echo #define IVTYPE $(INT64)>>$@
1036 @echo #define UVTYPE unsigned $(INT64)>>$@
1037 @echo #define IVSIZE ^8>>$@
1038 @echo #define UVSIZE ^8>>$@
1039 @echo #undef NV_PRESERVES_UV>>$@
1040 @echo #define NV_PRESERVES_UV_BITS 53>>$@
1041 @echo #define IVdf "$(INT64f)d">>$@
1042 @echo #define UVuf "$(INT64f)u">>$@
1043 @echo #define UVof "$(INT64f)o">>$@
1044 @echo #define UVxf "$(INT64f)x">>$@
1045 @echo #define UVXf "$(INT64f)X">>$@
1046 @echo #define USE_64_BIT_INT>>$@
1047.ELSE
1048 @echo #define IVTYPE long>>$@
1049 @echo #define UVTYPE unsigned long>>$@
1050 @echo #define IVSIZE ^4>>$@
1051 @echo #define UVSIZE ^4>>$@
1052 @echo #define NV_PRESERVES_UV>>$@
1053 @echo #define NV_PRESERVES_UV_BITS 32>>$@
1054 @echo #define IVdf "ld">>$@
1055 @echo #define UVuf "lu">>$@
1056 @echo #define UVof "lo">>$@
1057 @echo #define UVxf "lx">>$@
1058 @echo #define UVXf "lX">>$@
1059 @echo #undef USE_64_BIT_INT>>$@
1060.ENDIF
1061 @echo #endif>>$@
1062
1063..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
1064 cd .. && miniperl -Ilib make_patchnum.pl
1065
1066# make sure that we recompile perl.c if the git version changes
1067..\perl$(o) : ..\git_version.h
1068
1069..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1070 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1071 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1072
1073# This target is for when changes to the main config.sh happen.
1074# Edit config.gc, then make perl using GCC in a minimal configuration (i.e.
1075# with MULTI, ITHREADS, IMP_SYS, LARGE_FILES and PERLIO off), then make
1076# this target to regenerate config_H.gc.
1077regen_config_h:
1078 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1079 $(CFGSH_TMPL) > ..\config.sh
1080 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1081 -del /f $(CFGH_TMPL)
1082 -$(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)"
1083 rename config.h $(CFGH_TMPL)
1084
1085$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
1086 $(MINIPERL) -I..\lib ..\configpm --chdir=..
1087 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1088 $(XCOPY) ..\*.h $(COREDIR)\*.*
1089 $(XCOPY) *.h $(COREDIR)\*.*
1090 $(RCOPY) include $(COREDIR)\*.*
1091 $(MINIPERL) -I..\lib config_h.PL "ARCHPREFIX=$(ARCHPREFIX)" \
1092 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1093
1094# See the comment in Makefile.SH explaining this seemingly cranky ordering
1095$(MINIPERL) : ..\lib\buildcustomize.pl
1096
1097..\lib\buildcustomize.pl : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS) ..\write_buildcustomize.pl
1098.IF "$(CCTYPE)" == "GCC"
1099 $(LINK32) -v -mconsole -o $(MINIPERL) $(BLINK_FLAGS) \
1100 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1101.ELSE
1102 $(LINK32) -subsystem:console -out:$(MINIPERL) $(BLINK_FLAGS) \
1103 @$(mktmp $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ))
1104 $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/)
1105.ENDIF
1106 $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1107
1108$(MINIDIR) :
1109 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1110
1111$(MINICORE_OBJ) : $(CORE_NOCFG_H)
1112 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*B).c
1113
1114$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1115 $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*B).c
1116
1117# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1118# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1119# unless the .IF is true), so instead we use a .ELSE with the default.
1120# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1121
1122perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1123.IF "$(USE_IMP_SYS)" == "define"
1124 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1125.ELSE
1126 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1127.ENDIF
1128
1129# 1. we don't want to rebuild miniperl.exe when config.h changes
1130# 2. we don't want to rebuild miniperl.exe with non-default config.h
1131# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1132$(MINI_OBJ) : $(CORE_NOCFG_H)
1133
1134$(WIN32_OBJ) : $(CORE_H)
1135
1136$(CORE_OBJ) : $(CORE_H)
1137
1138$(DLL_OBJ) : $(CORE_H)
1139
1140$(X2P_OBJ) : $(CORE_H)
1141
1142perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
1143 $(MINIPERL) -I..\lib create_perllibst_h.pl
1144 $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1145 $(BUILDOPT) CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1146
1147$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1148.IF "$(CCTYPE)" == "GCC"
1149 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1150 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1151 $(shell @type Extensions_static) \
1152 $(LIBFILES) $(LKPOST))
1153 $(IMPLIB) --output-lib $(PERLIMPLIB) \
1154 --dllname $(PERLDLL:b).dll \
1155 --def perldll.def \
1156 --base-file perl.base \
1157 --output-exp perl.exp
1158 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1159 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1160 $(shell @type Extensions_static) \
1161 $(LIBFILES) perl.exp $(LKPOST))
1162.ELSE
1163 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
1164 @Extensions_static \
1165 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1166 $(PERLDLL_RES) $(PERLDLL_OBJ))
1167 $(EMBED_DLL_MANI)
1168.ENDIF
1169 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1170
1171$(PERLSTATICLIB): $(PERLDLL_OBJ) Extensions_static
1172.IF "$(CCTYPE)" == "GCC"
1173 $(LIB32) $(LIB_FLAGS) $@ $(PERLDLL_OBJ)
1174 if exist $(STATICDIR) rmdir /s /q $(STATICDIR)
1175 for %i in ($(shell @type Extensions_static)) do \
1176 @mkdir $(STATICDIR) && cd $(STATICDIR) && \
1177 $(ARCHPREFIX)ar x ..\%i && \
1178 $(ARCHPREFIX)ar q ..\$@ *$(o) && \
1179 cd .. && rmdir /s /q $(STATICDIR)
1180.ELSE
1181 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1182 @$(mktmp $(PERLDLL_OBJ))
1183.ENDIF
1184 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1185
1186$(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1187
1188..\x2p\a2p$(o) : ..\x2p\a2p.c
1189 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1190
1191..\x2p\hash$(o) : ..\x2p\hash.c
1192 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1193
1194..\x2p\str$(o) : ..\x2p\str.c
1195 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1196
1197..\x2p\util$(o) : ..\x2p\util.c
1198 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1199
1200..\x2p\walk$(o) : ..\x2p\walk.c
1201 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1202
1203$(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions
1204 $(MINIPERL) -I..\lib ..\x2p\find2perl.PL
1205 $(MINIPERL) -I..\lib ..\x2p\s2p.PL
1206.IF "$(CCTYPE)" == "GCC"
1207 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1208 $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
1209.ELSE
1210 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1211 @$(mktmp $(LIBFILES) $(X2P_OBJ))
1212 $(EMBED_EXE_MANI)
1213.ENDIF
1214
1215$(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1216
1217$(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1218
1219$(BITCOUNT_H) : $(GENUUDMAP)
1220 $(GENUUDMAP) $(GENERATED_HEADERS)
1221
1222$(GENUUDMAP_OBJ) : ..\mg_raw.h
1223
1224$(GENUUDMAP) : $(GENUUDMAP_OBJ)
1225.IF "$(CCTYPE)" == "GCC"
1226 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1227 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
1228.ELSE
1229 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1230 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
1231 $(EMBED_EXE_MANI)
1232.ENDIF
1233
1234perlmain.c : runperl.c
1235 copy runperl.c perlmain.c
1236
1237perlmain$(o) : perlmain.c
1238 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1239
1240perlmainst.c : runperl.c
1241 copy runperl.c perlmainst.c
1242
1243perlmainst$(o) : perlmainst.c
1244 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1245
1246$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1247.IF "$(CCTYPE)" == "GCC"
1248 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1249 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1250.ELSE
1251 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1252 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1253 $(EMBED_EXE_MANI)
1254.ENDIF
1255 copy $(PERLEXE) $(WPERLEXE)
1256 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1257
1258$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1259.IF "$(CCTYPE)" == "GCC"
1260 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1261 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES)
1262.ELSE
1263 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1264 $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1265 $(EMBED_EXE_MANI)
1266.ENDIF
1267
1268MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1269 $(MINIPERL) -I..\lib ..\mkppport
1270
1271#-------------------------------------------------------------------------------
1272# There's no direct way to mark a dependency on
1273# DynaLoader.pm, so this will have to do
1274Extensions : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1275 $(XCOPY) ..\*.h $(COREDIR)\*.*
1276 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1277
1278Extensions_reonly : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1279 $(XCOPY) ..\*.h $(COREDIR)\*.*
1280 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1281
1282Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
1283 $(XCOPY) ..\*.h $(COREDIR)\*.*
1284 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1285 $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1286
1287Extensions_nonxs : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1288 $(XCOPY) ..\*.h $(COREDIR)\*.*
1289 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1290
1291$(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1292 $(XCOPY) ..\*.h $(COREDIR)\*.*
1293 $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1294
1295Extensions_clean :
1296 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1297
1298Extensions_realclean :
1299 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1300
1301#-------------------------------------------------------------------------------
1302
1303
1304doc: $(PERLEXE) ..\pod\perltoc.pod
1305 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1306 --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1307 --recurse
1308
1309..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1310 $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1311
1312# Note that this next section is parsed (and regenerated) by pod/buildtoc
1313# so please check that script before making structural changes here
1314utils: $(PERLEXE) $(X2P) ..\utils\Makefile
1315 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1316 copy ..\README.aix ..\pod\perlaix.pod
1317 copy ..\README.amiga ..\pod\perlamiga.pod
1318 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1319 copy ..\README.ce ..\pod\perlce.pod
1320 copy ..\README.cn ..\pod\perlcn.pod
1321 copy ..\README.cygwin ..\pod\perlcygwin.pod
1322 copy ..\README.dos ..\pod\perldos.pod
1323 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1324 copy ..\README.haiku ..\pod\perlhaiku.pod
1325 copy ..\README.hpux ..\pod\perlhpux.pod
1326 copy ..\README.hurd ..\pod\perlhurd.pod
1327 copy ..\README.irix ..\pod\perlirix.pod
1328 copy ..\README.jp ..\pod\perljp.pod
1329 copy ..\README.ko ..\pod\perlko.pod
1330 copy ..\README.linux ..\pod\perllinux.pod
1331 copy ..\README.macos ..\pod\perlmacos.pod
1332 copy ..\README.macosx ..\pod\perlmacosx.pod
1333 copy ..\README.netware ..\pod\perlnetware.pod
1334 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1335 copy ..\README.os2 ..\pod\perlos2.pod
1336 copy ..\README.os390 ..\pod\perlos390.pod
1337 copy ..\README.os400 ..\pod\perlos400.pod
1338 copy ..\README.plan9 ..\pod\perlplan9.pod
1339 copy ..\README.qnx ..\pod\perlqnx.pod
1340 copy ..\README.riscos ..\pod\perlriscos.pod
1341 copy ..\README.solaris ..\pod\perlsolaris.pod
1342 copy ..\README.symbian ..\pod\perlsymbian.pod
1343 copy ..\README.synology ..\pod\perlsynology.pod
1344 copy ..\README.tru64 ..\pod\perltru64.pod
1345 copy ..\README.tw ..\pod\perltw.pod
1346 copy ..\README.vos ..\pod\perlvos.pod
1347 copy ..\README.win32 ..\pod\perlwin32.pod
1348 copy ..\pod\perldelta.pod ..\pod\perl5196delta.pod
1349 $(PERLEXE) $(PL2BAT) $(UTILS)
1350 $(MINIPERL) -I..\lib ..\autodoc.pl ..
1351 $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1352
1353..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1354 $(PERLEXE) -f ..\pod\buildtoc -q
1355
1356# Note that the pod cleanup in this next section is parsed (and regenerated
1357# by pod/buildtoc so please check that script before making changes here
1358
1359distclean: realclean
1360 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1361 $(PERLIMPLIB) ..\miniperl$(a) $(PERLEXESTATIC) $(PERLSTATICLIB)
1362 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1363 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1364 -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1365 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1366 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1367 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1368 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1369 -del /f $(LIBDIR)\File\Glob.pm
1370 -del /f $(LIBDIR)\Storable.pm
1371 -del /f $(LIBDIR)\Sys\Hostname.pm
1372 -del /f $(LIBDIR)\Time\HiRes.pm
1373 -del /f $(LIBDIR)\Unicode\Normalize.pm
1374 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1375 -del /f $(LIBDIR)\Win32.pm
1376 -del /f $(LIBDIR)\Win32CORE.pm
1377 -del /f $(LIBDIR)\Win32API\File.pm
1378 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1379 -del /f $(LIBDIR)\buildcustomize.pl
1380 -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1381 -del /f *.def *.map
1382 -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1383 -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1384 -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1385 -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1386 -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1387 -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI
1388 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1389 -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1390 -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1391 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1392 -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1393 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1394 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1395 -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1396 -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1397 -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1398 -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1399 -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1400 -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1401 -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1402 -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1403 -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1404 -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1405 -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1406 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1407 -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1408 -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1409 -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1410 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1411 -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1412 -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1413 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1414 -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1415 -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1416 -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1417 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1418 -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1419 -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1420 -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
1421 -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1422 -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1423 -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1424 -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1425 -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1426 -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1427 -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1428 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1429 -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1430 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1431 -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1432 -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1433 -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1434 -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1435 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1436 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1437 -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1438 -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1439 -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1440 -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1441 -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1442 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1443 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1444 -cd $(PODDIR) && del /f *.html *.bat roffitall \
1445 perl5196delta.pod perlaix.pod perlamiga.pod perlapi.pod \
1446 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod perldos.pod \
1447 perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
1448 perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
1449 perlmacos.pod perlmacosx.pod perlmodlib.pod perlnetware.pod \
1450 perlopenbsd.pod perlos2.pod perlos390.pod perlos400.pod \
1451 perlplan9.pod perlqnx.pod perlriscos.pod perlsolaris.pod \
1452 perlsymbian.pod perlsynology.pod perltoc.pod perltru64.pod \
1453 perltw.pod perluniprops.pod perlvos.pod perlwin32.pod
1454 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1455 perldoc perlivp libnetcfg enc2xs piconv cpan *.bat \
1456 xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist config_data zipdetails
1457 -cd ..\x2p && del /f find2perl s2p psed *.bat
1458 -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1459 perlmainst.c
1460 -del /f $(CONFIGPM)
1461 -del /f ..\lib\Config_git.pl
1462 -del /f bin\*.bat
1463 -del /f perllibst.h
1464 -del /f $(PERLEXE_RES) perl.base
1465 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1466 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1467 -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1468 -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1469 -del /s ..\utils\Makefile
1470 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1471 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1472 -if exist pod2htmd.tmp del pod2htmd.tmp
1473 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1474 -del /f ..\t\test_state
1475
1476install : all installbare installhtml
1477
1478installbare : utils ..\pod\perltoc.pod
1479 $(PERLEXE) ..\installperl
1480 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1481 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1482 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1483 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1484 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1485 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1486
1487installhtml : doc
1488 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1489
1490inst_lib : $(CONFIGPM)
1491 $(RCOPY) ..\lib $(INST_LIB)\*.*
1492
1493$(UNIDATAFILES) ..\pod\perluniprops.pod .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1494 cd ..\lib\unicore && \
1495 ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p
1496
1497minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1498 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1499 if exist ..\t\perl.exe del /f ..\t\perl.exe
1500 rename ..\t\miniperl.exe perl.exe
1501 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1502 attrib -r ..\t\*.*
1503 cd ..\t && \
1504 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
1505
1506test-prep : all utils ..\pod\perltoc.pod
1507 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1508 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1509 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1510.IF "$(CCTYPE)" == "GCC"
1511# If building with gcc versions 4.x.x or greater, then
1512# the GCC helper DLL will also need copied to the test directory.
1513# The name of the dll can change, depending upon which vendor has supplied
1514# your compiler, and upon the values of "x".
1515# libstdc++-6.dll is copied if it exists as it, too, may then be needed.
1516# Without this copying, the op/taint.t test script will fail.
1517 if exist $(CCDLLDIR)\libgcc_s_sjlj-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_sjlj-1.dll ..\t\$(NULL)
1518 if exist $(CCDLLDIR)\libgcc_s_dw2-1.dll $(XCOPY) $(CCDLLDIR)\libgcc_s_dw2-1.dll ..\t\$(NULL)
1519 if exist $(CCDLLDIR)\libstdc++-6.dll $(XCOPY) $(CCDLLDIR)\libstdc++-6.dll ..\t\$(NULL)
1520.ENDIF
1521
1522test : test-prep
1523 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1524 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1525
1526test_porting : test-prep
1527 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1528 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1529
1530test-reonly : reonly utils
1531 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1532 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1533 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1534 cd ..\t && \
1535 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\\/ $(EXTRA) && \
1536 cd ..\win32
1537
1538regen :
1539 cd .. && regen.pl && cd win32
1540
1541test-notty : test-prep
1542 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1543 set PERL_SKIP_TTY_TEST=1 && \
1544 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1545
1546_test :
1547 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1548 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1549 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1550 set PERL_STATIC_EXT=$(STATIC_EXT) && \
1551 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1552
1553_clean :
1554 -@erase miniperlmain$(o)
1555 -@erase $(MINIPERL)
1556 -@erase perlglob$(o)
1557 -@erase perlmain$(o)
1558 -@erase perlmainst$(o)
1559 -@erase config.w32
1560 -@erase /f config.h
1561 -@erase /f ..\git_version.h
1562 -@erase $(GLOBEXE)
1563 -@erase $(PERLEXE)
1564 -@erase $(WPERLEXE)
1565 -@erase $(PERLEXESTATIC)
1566 -@erase $(PERLSTATICLIB)
1567 -@erase $(PERLDLL)
1568 -@erase $(CORE_OBJ)
1569 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1570 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1571 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1572 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1573 -@erase $(UNIDATAFILES)
1574 -@erase $(WIN32_OBJ)
1575 -@erase $(DLL_OBJ)
1576 -@erase $(X2P_OBJ)
1577 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1578 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1579 -@erase ..\x2p\*.exe ..\x2p\*.bat
1580 -@erase *.ilk
1581 -@erase *.pdb
1582 -@erase Extensions_static
1583
1584
1585
1586clean : Extensions_clean _clean
1587
1588realclean : Extensions_realclean _clean
1589
1590# Handy way to run perlbug -ok without having to install and run the
1591# installed perlbug. We don't re-run the tests here - we trust the user.
1592# Please *don't* use this unless all tests pass.
1593# If you want to report test failures, use "dmake nok" instead.
1594ok: utils
1595 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1596
1597okfile: utils
1598 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1599
1600nok: utils
1601 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1602
1603nokfile: utils
1604 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok