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