This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a test.taintwarn makefile target,
[perl5.git] / win32 / Makefile
CommitLineData
9e42cd94
GS
1#
2# Makefile to build perl on Windows NT using Microsoft NMAKE.
3# Supported compilers:
c623ac67
GS
4# Visual C++ 2.0 through 6.0 (and possibly newer versions)
5# MS Platform SDK 64-bit compiler and tools **experimental**
9e42cd94
GS
6#
7# This is set up to build a perl.exe that runs off a shared library
78a7c709 8# (perl59.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#
27# Comment this out if you DON'T want your perl installation to be versioned.
28# This means that the new installation will overwrite any files from the
29# old installation at the same INST_TOP location. Leaving it enabled is
30# the safest route, as perl adds the extra version directory to all the
31# locations it installs files to. If you disable it, an alternative
32# versioned installation can be obtained by setting INST_TOP above to a
33# path that includes an arbitrary version string.
34#
4282de36 35#INST_VER = \5.8.0
9e42cd94
GS
36
37#
38# Comment this out if you DON'T want your perl installation to have
39# architecture specific components. This means that architecture-
40# specific files will be installed along with the architecture-neutral
41# files. Leaving it enabled is safer and more flexible, in case you
42# want to build multiple flavors of perl and install them together in
43# the same location. Commenting it out gives you a simpler
44# installation that is easier to understand for beginners.
45#
46#INST_ARCH = \$(ARCHNAME)
47
48#
49# uncomment to enable multiple interpreters. This is need for fork()
f7d585d3 50# emulation and for thread support.
9e42cd94
GS
51#
52USE_MULTI = define
53
54#
f7d585d3 55# Beginnings of interpreter cloning/threads; now reasonably complete.
9e42cd94
GS
56# This should be enabled to get the fork() emulation. This needs
57# USE_MULTI as well.
58#
59USE_ITHREADS = define
60
61#
62# uncomment to enable the implicit "host" layer for all system calls
63# made by perl. This needs USE_MULTI above. This is also needed to
64# get fork().
65#
66USE_IMP_SYS = define
67
68#
f7d585d3
GS
69# Comment out next assign to disable perl's I/O subsystem and use compiler's
70# stdio for IO - depending on your compiler vendor and run time library you may
71# then get a number of fails from make test i.e. bugs - complain to them not us ;-).
72# You will also be unable to take full advantage of perl5.8's support for multiple
73# encodings and may see lower IO performance. You have been warned.
9e42cd94
GS
74USE_PERLIO = define
75
76#
4a9d6100
GS
77# Comment this out if you don't want to enable large file support for
78# some reason. Should normally only be changed to maintain compatibility
79# with an older release of perl.
80USE_LARGE_FILES = define
81
82#
9e42cd94
GS
83# uncomment one of the following lines if you are using either
84# Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
85#
86#CCTYPE = MSVC20
4a9d6100 87CCTYPE = MSVC60
9e42cd94
GS
88
89#
90# uncomment next line if you want debug version of perl (big,slow)
f7d585d3
GS
91# If not enabled, we automatically try to use maximum optimization
92# with all compilers that are known to have a working optimizer.
9e42cd94
GS
93#
94#CFG = Debug
95
96#
97# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
98# It has patches that fix known bugs in older versions of MSVCRT.DLL.
99# This currently requires VC 5.0 with Service Pack 3 or later.
100# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
101# and follow the directions in the package to install.
102#
103# Not recommended if you have VC 6.x and you're not running Windows 9x.
104#
105#USE_PERLCRT = define
106
107#
108# uncomment to enable linking with setargv.obj under the Visual C
109# compiler. Setting this options enables perl to expand wildcards in
110# arguments, but it may be harder to use alternate methods like
111# File::DosGlob that are more powerful. This option is supported only with
112# Visual C.
113#
114#USE_SETARGV = define
115
116#
4ace4afb
SH
117# if you want to have the crypt() builtin function implemented, leave this or
118# CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
119# version of des_fcrypt().
9e42cd94 120#
4ace4afb 121CRYPT_SRC = fcrypt.c
9e42cd94
GS
122
123#
124# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
125# library, uncomment this, and make sure the library exists (see README.win32)
126# Specify the full pathname of the library.
127#
128#CRYPT_LIB = fcrypt.lib
129
130#
131# set this if you wish to use perl's malloc
132# WARNING: Turning this on/off WILL break binary compatibility with extensions
133# you may have compiled with/without it. Be prepared to recompile all
134# extensions if you change the default. Currently, this cannot be enabled
135# if you ask for USE_IMP_SYS above.
136#
137#PERL_MALLOC = define
138
139#
06c896bb
SH
140# set this to enable debugging mstats
141# This must be enabled to use the Devel::Peek::mstat() function. This cannot
142# be enabled without PERL_MALLOC as well.
143#
144#DEBUG_MSTATS = define
145
146#
147#
9e42cd94
GS
148# set the install locations of the compiler include/libraries
149# Running VCVARS32.BAT is *required* when using Visual C.
150# Some versions of Visual C don't define MSVCDIR in the environment,
151# so you may have to set CCHOME explicitly (spaces in the path name should
152# not be quoted)
153#
154#CCHOME = f:\msvc20
155CCHOME = $(MSVCDIR)
156CCINCDIR = $(CCHOME)\include
157CCLIBDIR = $(CCHOME)\lib
158
159#
160# Additional compiler flags can be specified here.
161#
162
163#
164# This should normally be disabled. Adding -DPERL_POLLUTE enables support
165# for old symbols by default, at the expense of extreme pollution. You most
166# probably just want to build modules that won't compile with
167# perl Makefile.PL POLLUTE=1
168# instead of enabling this. Please report such modules to the respective
169# authors.
170#
171#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
172
173#
174# This should normally be disabled. Enabling it will disable the File::Glob
175# implementation of CORE::glob.
176#
177#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
178
179#
180# This should normally be disabled. Enabling it causes perl to read scripts
181# in text mode (which is the 5.005 behavior) and will break ByteLoader.
182#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
183
184#
185# specify semicolon-separated list of extra directories that modules will
186# look for libraries (spaces in path names need not be quoted)
187#
188EXTRALIBDIRS =
189
190#
191# set this to your email address (perl will guess a value from
192# from your loginname and your hostname, which may not be right)
193#
194#EMAIL =
195
196##
197## Build configuration ends.
198##
199
200##################### CHANGE THESE ONLY IF YOU MUST #####################
201
202!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
203D_CRYPT = undef
204!ELSE
205D_CRYPT = define
206CRYPT_FLAG = -DHAVE_DES_FCRYPT
207!ENDIF
208
209!IF "$(PERL_MALLOC)" == ""
210PERL_MALLOC = undef
06c896bb
SH
211DEBUG_MSTATS = undef
212!ENDIF
213
214!IF "$(DEBUG_MSTATS)" == ""
215DEBUG_MSTATS = undef
216!ENDIF
217
218!IF "$(DEBUG_MSTATS)" == "define"
219BUILDOPT = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
9e42cd94
GS
220!ENDIF
221
9e42cd94
GS
222!IF "$(USE_IMP_SYS)" == "define"
223PERL_MALLOC = undef
224!ENDIF
225
226!IF "$(USE_MULTI)" == ""
227USE_MULTI = undef
228!ENDIF
229
230!IF "$(USE_ITHREADS)" == ""
231USE_ITHREADS = undef
232!ENDIF
233
234!IF "$(USE_IMP_SYS)" == ""
235USE_IMP_SYS = undef
236!ENDIF
237
238!IF "$(USE_PERLIO)" == ""
239USE_PERLIO = undef
240!ENDIF
241
4a9d6100
GS
242!IF "$(USE_LARGE_FILES)" == ""
243USE_LARGE_FILES = undef
244!ENDIF
245
9e42cd94
GS
246!IF "$(USE_PERLCRT)" == ""
247USE_PERLCRT = undef
248!ENDIF
249
3db8f154 250!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
9e42cd94
GS
251USE_MULTI = define
252!ENDIF
253
254!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
255USE_MULTI = define
9e42cd94
GS
256!ENDIF
257
3db8f154 258!IF "$(USE_MULTI)" != "undef"
9e42cd94
GS
259BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
260!ENDIF
261
262!IF "$(USE_IMP_SYS)" != "undef"
263BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
264!ENDIF
265
266!IF "$(PROCESSOR_ARCHITECTURE)" == ""
267PROCESSOR_ARCHITECTURE = x86
268!ENDIF
269
c623ac67
GS
270!IF "$(WIN64)" == ""
271!IF "$(PROCESSOR_ARCHITEW6432)" != ""
272PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
273WIN64 = define
274!ELSE
275!IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
276WIN64 = define
277!ELSE
278WIN64 = undef
279!ENDIF
280!ENDIF
281!ENDIF
282
9e42cd94
GS
283!IF "$(USE_MULTI)" == "define"
284ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
285!ELSE
286!IF "$(USE_PERLIO)" == "define"
287ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
288!ELSE
289ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
290!ENDIF
291!ENDIF
9e42cd94
GS
292
293!IF "$(USE_PERLIO)" == "define"
294BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
295!ENDIF
296
297!IF "$(USE_ITHREADS)" == "define"
298ARCHNAME = $(ARCHNAME)-thread
299!ENDIF
300
301# Visual Studio 98 specific
302!IF "$(CCTYPE)" == "MSVC60"
303
304# VC 6.0 can load the socket dll on demand. Makes the test suite
305# run in about 10% less time.
306DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
307!ENDIF
308
309ARCHDIR = ..\lib\$(ARCHNAME)
310COREDIR = ..\lib\CORE
311AUTODIR = ..\lib\auto
312LIBDIR = ..\lib
313EXTDIR = ..\ext
314PODDIR = ..\pod
315EXTUTILSDIR = $(LIBDIR)\ExtUtils
316
317#
318INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
319INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
320INST_LIB = $(INST_TOP)$(INST_VER)\lib
321INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
322INST_COREDIR = $(INST_ARCHLIB)\CORE
323INST_POD = $(INST_LIB)\pod
324INST_HTML = $(INST_TOP)$(INST_VER)\html
325
326#
327# Programs to compile, build .lib files and link
328#
329
330CC = cl
331LINK32 = link
332LIB32 = $(LINK32) -lib
333RSC = rc
334
335#
336# Options
337#
338
339INCLUDES = -I$(COREDIR) -I.\include -I. -I..
340#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
341DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
342LOCDEFS = -DPERLDLL -DPERL_CORE
343SUBSYS = console
344CXX_FLAG = -TP -GX
345
346!IF "$(USE_PERLCRT)" != "define"
347LIBC = msvcrt.lib
348!ELSE
349LIBC = PerlCRT.lib
350!ENDIF
351
352PERLEXE_RES =
353PERLDLL_RES =
354
355!IF "$(CFG)" == "Debug"
356! IF "$(CCTYPE)" == "MSVC20"
357OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
358! ELSE
359OPTIMIZE = -Od -MD -Zi -DDEBUGGING
360! ENDIF
c623ac67 361LINK_DBG = -debug
9e42cd94 362!ELSE
d921a5fb 363OPTIMIZE = -MD -DNDEBUG
9e42cd94 364LINK_DBG = -release
d921a5fb
GS
365! IF "$(WIN64)" == "define"
366# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
367OPTIMIZE = $(OPTIMIZE) -Ox -GL
368LINK_DBG = $(LINK_DBG) -ltcg
369! ELSE
370# -O1 yields smaller code, which turns out to be faster than -O2 on x86
371OPTIMIZE = $(OPTIMIZE) -O1
372#OPTIMIZE = $(OPTIMIZE) -O2
373! ENDIF
9e42cd94
GS
374!ENDIF
375
c623ac67
GS
376!IF "$(WIN64)" == "define"
377DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
378OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
379!ENDIF
380
9e42cd94
GS
381!IF "$(USE_PERLCRT)" != "define"
382BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
383!ENDIF
384
385LIBBASEFILES = $(CRYPT_LIB) \
386 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
387 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
388 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
c623ac67
GS
389 version.lib
390
391# win64 doesn't have some libs
392!IF "$(WIN64)" != "define"
393LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
394!ENDIF
9e42cd94
GS
395
396# we add LIBC here, since we may be using PerlCRT.dll
397LIBFILES = $(LIBBASEFILES) $(LIBC)
398
399CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
400 $(PCHFLAGS) $(OPTIMIZE)
401LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
402 -libpath:"$(INST_COREDIR)" \
403 -machine:$(PROCESSOR_ARCHITECTURE)
404OBJOUT_FLAG = -Fo
405EXEOUT_FLAG = -Fe
406
407CFLAGS_O = $(CFLAGS) $(BUILDOPT)
408
409#################### do not edit below this line #######################
410############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
411
412o = .obj
413
414#
415# Rules
416#
417
418.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
419
420.c$(o):
421 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
422
423.y.c:
424 $(NOOP)
425
426$(o).dll:
427 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
428 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
429
430.rc.res:
431 $(RSC) -i.. $<
432
433#
434# various targets
435
436# makedef.pl must be updated if this changes, and this should normally
437# only change when there is an incompatible revision of the public API.
78a7c709
HS
438PERLIMPLIB = ..\perl59.lib
439PERLDLL = ..\perl59.dll
9e42cd94
GS
440
441MINIPERL = ..\miniperl.exe
442MINIDIR = .\mini
443PERLEXE = ..\perl.exe
444WPERLEXE = ..\wperl.exe
445GLOBEXE = ..\perlglob.exe
446CONFIGPM = ..\lib\Config.pm
447MINIMOD = ..\lib\ExtUtils\Miniperl.pm
448X2P = ..\x2p\a2p.exe
449
450# Nominate a target which causes extensions to be re-built
451# This used to be $(PERLEXE), but at worst it is the .dll that they depend
452# on and really only the interface - i.e. the .def file used to export symbols
453# from the .dll
454PERLDEP = perldll.def
455
456PL2BAT = bin\pl2bat.pl
457GLOBBAT = bin\perlglob.bat
458
459UTILS = \
460 ..\utils\h2ph \
461 ..\utils\splain \
462 ..\utils\dprofpp \
463 ..\utils\perlbug \
464 ..\utils\pl2pm \
465 ..\utils\c2ph \
827a599d 466 ..\utils\pstruct \
9e42cd94
GS
467 ..\utils\h2xs \
468 ..\utils\perldoc \
469 ..\utils\perlcc \
470 ..\utils\perlivp \
471 ..\utils\libnetcfg \
827a599d
GS
472 ..\utils\enc2xs \
473 ..\utils\piconv \
83cd6e83 474 ..\utils\cpan \
9e42cd94
GS
475 ..\pod\checkpods \
476 ..\pod\pod2html \
477 ..\pod\pod2latex \
478 ..\pod\pod2man \
479 ..\pod\pod2text \
480 ..\pod\pod2usage \
481 ..\pod\podchecker \
482 ..\pod\podselect \
483 ..\x2p\find2perl \
827a599d 484 ..\x2p\psed \
9e42cd94
GS
485 ..\x2p\s2p \
486 ..\lib\ExtUtils\xsubpp \
487 bin\exetype.pl \
488 bin\runperl.pl \
489 bin\pl2bat.pl \
490 bin\perlglob.pl \
491 bin\search.pl
492
493MAKE = nmake -nologo
494MAKE_BARE = nmake
495
c623ac67
GS
496!IF "$(WIN64)" == "define"
497CFGSH_TMPL = config.vc64
498CFGH_TMPL = config_H.vc64
499!ELSE
9e42cd94
GS
500CFGSH_TMPL = config.vc
501CFGH_TMPL = config_H.vc
c623ac67 502!ENDIF
9e42cd94
GS
503
504XCOPY = xcopy /f /r /i /d
505RCOPY = xcopy /f /r /i /e /d
506NOOP = @echo
507NULL =
508
509DEL = del
510
511#
512# filenames given to xsubpp must have forward slashes (since it puts
513# full pathnames in #line strings)
514XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
515 -C++ -prototypes
516
517MICROCORE_SRC = \
518 ..\av.c \
519 ..\deb.c \
520 ..\doio.c \
521 ..\doop.c \
522 ..\dump.c \
523 ..\globals.c \
524 ..\gv.c \
525 ..\hv.c \
526 ..\locale.c \
527 ..\mg.c \
528 ..\numeric.c \
529 ..\op.c \
295f0f84 530 ..\pad.c \
9e42cd94
GS
531 ..\perl.c \
532 ..\perlapi.c \
533 ..\perly.c \
534 ..\pp.c \
535 ..\pp_ctl.c \
536 ..\pp_hot.c \
537 ..\pp_pack.c \
538 ..\pp_sort.c \
539 ..\pp_sys.c \
10bc17b6 540 ..\reentr.c \
9e42cd94
GS
541 ..\regcomp.c \
542 ..\regexec.c \
543 ..\run.c \
544 ..\scope.c \
545 ..\sv.c \
546 ..\taint.c \
547 ..\toke.c \
548 ..\universal.c \
549 ..\utf8.c \
550 ..\util.c \
551 ..\xsutils.c
552
553EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
554
555!IF "$(PERL_MALLOC)" == "define"
556EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
557!ENDIF
558
559EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
560
561WIN32_SRC = \
562 .\win32.c \
563 .\win32sck.c \
564 .\win32thread.c
565
f7d585d3
GS
566# We need this for miniperl build unless we override canned
567# config.h #define building mini\*
568#!IF "$(USE_PERLIO)" == "define"
9e42cd94 569WIN32_SRC = $(WIN32_SRC) .\win32io.c
f7d585d3 570#!ENDIF
9e42cd94
GS
571
572!IF "$(CRYPT_SRC)" != ""
573WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
574!ENDIF
575
576DLL_SRC = $(DYNALOADER).c
577
578X2P_SRC = \
579 ..\x2p\a2p.c \
580 ..\x2p\hash.c \
581 ..\x2p\str.c \
582 ..\x2p\util.c \
583 ..\x2p\walk.c
584
585CORE_NOCFG_H = \
586 ..\av.h \
587 ..\cop.h \
588 ..\cv.h \
589 ..\dosish.h \
590 ..\embed.h \
591 ..\form.h \
592 ..\gv.h \
593 ..\handy.h \
594 ..\hv.h \
595 ..\iperlsys.h \
596 ..\mg.h \
597 ..\nostdio.h \
598 ..\op.h \
599 ..\opcode.h \
600 ..\perl.h \
601 ..\perlapi.h \
602 ..\perlsdio.h \
603 ..\perlsfio.h \
604 ..\perly.h \
605 ..\pp.h \
606 ..\proto.h \
607 ..\regexp.h \
608 ..\scope.h \
609 ..\sv.h \
610 ..\thread.h \
611 ..\unixish.h \
612 ..\utf8.h \
613 ..\util.h \
614 ..\warnings.h \
615 ..\XSUB.h \
616 ..\EXTERN.h \
617 ..\perlvars.h \
618 ..\intrpvar.h \
619 ..\thrdvar.h \
620 .\include\dirent.h \
621 .\include\netdb.h \
622 .\include\sys\socket.h \
623 .\win32.h
624
625CORE_H = $(CORE_NOCFG_H) .\config.h
626
627MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
628CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
629WIN32_OBJ = $(WIN32_SRC:.c=.obj)
630MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
631 $(MINIDIR)\miniperlmain$(o) \
632 $(MINIDIR)\perlio$(o)
633MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
634MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
635DLL_OBJ = $(DLL_SRC:.c=.obj)
636X2P_OBJ = $(X2P_SRC:.c=.obj)
637
638PERLDLL_OBJ = $(CORE_OBJ)
639PERLEXE_OBJ = perlmain$(o)
640
641PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
642#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
643
644!IF "$(USE_SETARGV)" != ""
645SETARGV_OBJ = setargv$(o)
646!ENDIF
647
648DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
649SOCKET = $(EXTDIR)\Socket\Socket
650FCNTL = $(EXTDIR)\Fcntl\Fcntl
651OPCODE = $(EXTDIR)\Opcode\Opcode
652SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
653IO = $(EXTDIR)\IO\IO
654POSIX = $(EXTDIR)\POSIX\POSIX
655ATTRS = $(EXTDIR)\attrs\attrs
656THREAD = $(EXTDIR)\Thread\Thread
657B = $(EXTDIR)\B\B
658RE = $(EXTDIR)\re\re
659DUMPER = $(EXTDIR)\Data\Dumper\Dumper
660ERRNO = $(EXTDIR)\Errno\Errno
661PEEK = $(EXTDIR)\Devel\Peek\Peek
662BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
663DPROF = $(EXTDIR)\Devel\DProf\DProf
664GLOB = $(EXTDIR)\File\Glob\Glob
665HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
666STORABLE = $(EXTDIR)\Storable\Storable
667FILTER = $(EXTDIR)\Filter\Util\Call\Call
668ENCODE = $(EXTDIR)\Encode\Encode
669MD5 = $(EXTDIR)\Digest\MD5\MD5
e934609f 670PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
9e42cd94
GS
671MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
672TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
673CWD = $(EXTDIR)\Cwd\Cwd
674LISTUTIL = $(EXTDIR)\List\Util\Util
e934609f 675PERLIOVIA = $(EXTDIR)\PerlIO\via\via
83e2e978 676XSAPITEST = $(EXTDIR)\XS\APItest\APItest
9e42cd94
GS
677XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
678UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
679
680SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
681FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
682OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
683SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
684IO_DLL = $(AUTODIR)\IO\IO.dll
685POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
686ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
687THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
688B_DLL = $(AUTODIR)\B\B.dll
689DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
690PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
691RE_DLL = $(AUTODIR)\re\re.dll
692BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
693DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
694GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
695HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
696STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
697FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
698ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
699MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
e934609f 700PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
9e42cd94
GS
701MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
702TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
703CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
704LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
e934609f 705PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
83e2e978 706XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
9e42cd94
GS
707XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
708UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
709
710EXTENSION_C = \
711 $(SOCKET).c \
712 $(FCNTL).c \
713 $(OPCODE).c \
714 $(SDBM_FILE).c \
715 $(IO).c \
716 $(POSIX).c \
717 $(ATTRS).c \
718 $(THREAD).c \
719 $(RE).c \
720 $(DUMPER).c \
721 $(PEEK).c \
722 $(B).c \
723 $(BYTELOADER).c \
724 $(DPROF).c \
725 $(GLOB).c \
726 $(HOSTNAME).c \
727 $(STORABLE).c \
728 $(FILTER).c \
729 $(ENCODE).c \
730 $(MD5).c \
731 $(PERLIOSCALAR).c \
732 $(MIMEBASE64).c \
733 $(TIMEHIRES).c \
734 $(CWD).c \
735 $(LISTUTIL).c \
736 $(PERLIOVIA).c \
83e2e978 737 $(XSAPITEST).c \
9e42cd94
GS
738 $(XSTYPEMAP).c \
739 $(UNICODENORMALIZE).c
740
741EXTENSION_DLL = \
742 $(SOCKET_DLL) \
743 $(FCNTL_DLL) \
744 $(OPCODE_DLL) \
745 $(SDBM_FILE_DLL)\
746 $(IO_DLL) \
747 $(POSIX_DLL) \
748 $(ATTRS_DLL) \
749 $(DUMPER_DLL) \
750 $(PEEK_DLL) \
751 $(B_DLL) \
752 $(RE_DLL) \
753 $(THREAD_DLL) \
754 $(BYTELOADER_DLL) \
755 $(DPROF_DLL) \
756 $(GLOB_DLL) \
757 $(HOSTNAME_DLL) \
758 $(STORABLE_DLL) \
759 $(FILTER_DLL) \
760 $(ENCODE_DLL) \
761 $(MD5_DLL) \
762 $(PERLIOSCALAR_DLL) \
763 $(MIMEBASE64_DLL) \
764 $(TIMEHIRES_DLL) \
765 $(CWD_DLL) \
766 $(LISTUTIL_DLL) \
767 $(PERLIOVIA_DLL) \
83e2e978 768 $(XSAPITEST_DLL) \
9e42cd94
GS
769 $(XSTYPEMAP_DLL) \
770 $(UNICODENORMALIZE_DLL)
771
772POD2HTML = $(PODDIR)\pod2html
773POD2MAN = $(PODDIR)\pod2man
774POD2LATEX = $(PODDIR)\pod2latex
775POD2TEXT = $(PODDIR)\pod2text
776
777CFG_VARS = \
778 "INST_DRV=$(INST_DRV)" \
779 "INST_TOP=$(INST_TOP)" \
780 "INST_VER=$(INST_VER)" \
781 "INST_ARCH=$(INST_ARCH)" \
782 "archname=$(ARCHNAME)" \
783 "cc=$(CC)" \
784 "ld=$(LINK32)" \
785 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
786 "cf_email=$(EMAIL)" \
787 "d_crypt=$(D_CRYPT)" \
788 "d_mymalloc=$(PERL_MALLOC)" \
789 "libs=$(LIBFILES)" \
790 "incpath=$(CCINCDIR:"=\")" \
791 "libperl=$(PERLIMPLIB:..\=)" \
792 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
793 "libc=$(LIBC)" \
794 "make=$(MAKE_BARE)" \
7e0017d3 795 "usethreads=$(USE_ITHREADS)" \
9e42cd94 796 "useithreads=$(USE_ITHREADS)" \
9e42cd94
GS
797 "usemultiplicity=$(USE_MULTI)" \
798 "useperlio=$(USE_PERLIO)" \
4a9d6100 799 "uselargefiles=$(USE_LARGE_FILES)" \
9e42cd94
GS
800 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
801 "optimize=$(OPTIMIZE:"=\")"
802
803#
804# Top targets
805#
806
807all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
808 $(X2P) Extensions
809 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
810
811$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
812
813#------------------------------------------------------------
814
815$(GLOBEXE) : perlglob$(o)
816 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
817 perlglob$(o) setargv$(o)
818
819perlglob$(o) : perlglob.c
820
821config.w32 : $(CFGSH_TMPL)
822 copy $(CFGSH_TMPL) config.w32
823
824.\config.h : $(CFGH_TMPL)
825 -del /f config.h
826 copy $(CFGH_TMPL) config.h
827
828..\config.sh : config.w32 $(MINIPERL) config_sh.PL
829 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
830
831# this target is for when changes to the main config.sh happen
832# edit config.{b,v,g}c and make this target once for each supported
833# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
834regen_config_h:
835 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
836 cd ..
8839b9e4 837 -del /f perl.exe perl*.dll
9e42cd94
GS
838 perl configpm
839 cd win32
840 -del /f $(CFGH_TMPL)
841 -mkdir $(COREDIR)
8839b9e4 842 -perl config_h.PL "INST_VER=$(INST_VER)"
9e42cd94
GS
843 rename config.h $(CFGH_TMPL)
844
845$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
846 cd ..
847 miniperl configpm
848 cd win32
849 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
850 $(XCOPY) ..\*.h $(COREDIR)\*.*
851 $(XCOPY) *.h $(COREDIR)\*.*
852 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
853 $(RCOPY) include $(COREDIR)\*.*
854 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
855 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
856
857$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
858 $(LINK32) -subsystem:console -out:$@ @<<
859 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
860<<
861
862$(MINIDIR) :
863 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
864
865$(MINICORE_OBJ) : $(CORE_NOCFG_H)
866 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
867
868$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
869 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
870
871# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
872# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
873!IF "$(USE_IMP_SYS)" == "define"
874perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
875 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
876!ENDIF
877
878# 1. we don't want to rebuild miniperl.exe when config.h changes
879# 2. we don't want to rebuild miniperl.exe with non-default config.h
880$(MINI_OBJ) : $(CORE_NOCFG_H)
881
882$(WIN32_OBJ) : $(CORE_H)
883$(CORE_OBJ) : $(CORE_H)
884$(DLL_OBJ) : $(CORE_H)
885$(X2P_OBJ) : $(CORE_H)
886
887perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
888 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
889 CCTYPE=$(CCTYPE) > perldll.def
890
891$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
892 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
893 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
894<<
895 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
896
897$(MINIMOD) : $(MINIPERL) ..\minimod.pl
898 cd ..
899 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
900 cd win32
901
902..\x2p\a2p$(o) : ..\x2p\a2p.c
903 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
904
905..\x2p\hash$(o) : ..\x2p\hash.c
906 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
907
908..\x2p\str$(o) : ..\x2p\str.c
909 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
910
911..\x2p\util$(o) : ..\x2p\util.c
912 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
913
914..\x2p\walk$(o) : ..\x2p\walk.c
915 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
916
917$(X2P) : $(MINIPERL) $(X2P_OBJ)
918 $(MINIPERL) ..\x2p\find2perl.PL
919 $(MINIPERL) ..\x2p\s2p.PL
920 $(LINK32) -subsystem:console -out:$@ @<<
921 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
922<<
923
924perlmain.c : runperl.c
925 copy runperl.c perlmain.c
926
927perlmain$(o) : perlmain.c
928 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
929
930$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
931 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
932 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
933 copy $(PERLEXE) $(WPERLEXE)
934 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
935 copy splittree.pl ..
936 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
937
938$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
939 if not exist $(AUTODIR) mkdir $(AUTODIR)
940 cd $(EXTDIR)\$(*B)
941 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
942 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
943 cd ..\..\win32
944 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
945 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
946 cd $(EXTDIR)\$(*B)
947 $(XSUBPP) dl_win32.xs > $(*B).c
948 cd ..\..\win32
949
950$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
951 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
952
953#----------------------------------------------------------------------------------
954Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
955 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
956
957Extensions_clean:
958 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
959
960#----------------------------------------------------------------------------------
961
962doc: $(PERLEXE)
963 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
964 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
965 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
966
967utils: $(PERLEXE) $(X2P)
968 cd ..\utils
969 $(MAKE) PERL=$(MINIPERL)
970 cd ..\pod
971 copy ..\README.aix .\perlaix.pod
972 copy ..\README.amiga .\perlamiga.pod
973 copy ..\README.apollo .\perlapollo.pod
974 copy ..\README.beos .\perlbeos.pod
975 copy ..\README.bs2000 .\perlbs2000.pod
4cb44f92
JH
976 copy ..\README.ce .\perlce.pod
977 copy ..\README.cn .\perlcn.pod
9e42cd94
GS
978 copy ..\README.cygwin .\perlcygwin.pod
979 copy ..\README.dgux .\perldgux.pod
980 copy ..\README.dos .\perldos.pod
981 copy ..\README.epoc .\perlepoc.pod
4cb44f92 982 copy ..\README.freebsd .\perlfreebsd.pod
9e42cd94 983 copy ..\README.hpux .\perlhpux.pod
4cb44f92 984 copy ..\README.hurd .\perlhurd.pod
1a412519 985 copy ..\README.irix .\perlirix.pod
4cb44f92
JH
986 copy ..\README.jp .\perljp.pod
987 copy ..\README.ko .\perlko.pod
9e42cd94
GS
988 copy ..\README.machten .\perlmachten.pod
989 copy ..\README.macos .\perlmacos.pod
0d53b15f 990 copy ..\README.macosx .\perlmacosx.pod
9e42cd94
GS
991 copy ..\README.mint .\perlmint.pod
992 copy ..\README.mpeix .\perlmpeix.pod
993 copy ..\README.netware .\perlnetware.pod
994 copy ..\README.os2 .\perlos2.pod
995 copy ..\README.os390 .\perlos390.pod
6b0bc4bb 996 copy ..\README.os400 .\perlos400.pod
9e42cd94
GS
997 copy ..\README.plan9 .\perlplan9.pod
998 copy ..\README.qnx .\perlqnx.pod
999 copy ..\README.solaris .\perlsolaris.pod
1000 copy ..\README.tru64 .\perltru64.pod
4cb44f92 1001 copy ..\README.tw .\perltw.pod
9e42cd94
GS
1002 copy ..\README.uts .\perluts.pod
1003 copy ..\README.vmesa .\perlvmesa.pod
4cb44f92 1004 copy ..\README.vms .\perlvms.pod
9e42cd94
GS
1005 copy ..\README.vos .\perlvos.pod
1006 copy ..\README.win32 .\perlwin32.pod
4cb44f92 1007 copy ..\vms\perlvms.pod .\perlvms.pod
9e42cd94
GS
1008 $(MAKE) -f ..\win32\pod.mak converters
1009 cd ..\lib
1010 $(PERLEXE) lib_pm.PL
1011 cd ..\win32
1012 $(PERLEXE) $(PL2BAT) $(UTILS)
1013
522078af
GS
1014# the doubled rmdir calls are needed because older cmd shells
1015# don't understand /q
9e42cd94
GS
1016distclean: clean
1017 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1018 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1019 -del /f *.def *.map
1020 -del /f $(EXTENSION_DLL)
1021 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1022 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1023 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1024 -del /f $(LIBDIR)\XSLoader.pm
1025 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1026 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1027 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1028 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1029 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1030 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1031 -del /f $(LIBDIR)\File\Glob.pm
1032 -del /f $(LIBDIR)\Storable.pm
1033 -del /f $(LIBDIR)\Filter\Util\Call.pm
1034 -del /f $(LIBDIR)\Digest\MD5.pm
e934609f
JH
1035 -del /f $(LIBDIR)\PerlIO\scalar.pm
1036 -del /f $(LIBDIR)\PerlIO\via.pm
9e42cd94
GS
1037 -del /f $(LIBDIR)\MIME\Base64.pm
1038 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1039 -del /f $(LIBDIR)\List\Util.pm
1040 -del /f $(LIBDIR)\Scalar\Util.pm
1041 -del /f $(LIBDIR)\Time\HiRes.pm
83e2e978 1042 -del /f $(LIBDIR)\XS\APItest.pm
9e42cd94
GS
1043 -del /f $(LIBDIR)\XS\Typemap.pm
1044 -del /f $(LIBDIR)\Unicode\Normalize.pm
1045 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
522078af 1046 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
9e42cd94 1047 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
522078af 1048 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
9e42cd94 1049 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
522078af 1050 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
9e42cd94 1051 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
522078af 1052 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
9e42cd94 1053 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
522078af 1054 -if exist $(LIBDIR)\Digest rmdir /s $(LIBDIR)\Digest
9e42cd94 1055 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
522078af 1056 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
9e42cd94 1057 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
522078af 1058 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
9e42cd94 1059 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
522078af 1060 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
9e42cd94 1061 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
522078af 1062 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
9e42cd94
GS
1063 cd $(PODDIR)
1064 -del /f *.html *.bat checkpods \
1065 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1066 perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1a412519
JH
1067 perldos.pod perlepoc.pod perlfreebsd.pod perlhurd.pod \
1068 perlhpux.pod perlirix.pod perlmachten.pod \
9e42cd94 1069 perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
6b0bc4bb
HS
1070 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1071 perlqnx.pod perlsolaris.pod perltru64.pod perluts.pod \
9e42cd94
GS
1072 perlvmesa.pod perlvms.pod perlvos.pod \
1073 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1074 podchecker podselect
1075 cd ..\utils
827a599d 1076 -del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
83cd6e83 1077 dprofpp perlcc libnetcfg enc2xs piconv cpan
9e42cd94
GS
1078 -del /f *.bat
1079 cd ..\win32
1080 cd ..\x2p
827a599d 1081 -del /f find2perl s2p psed
9e42cd94
GS
1082 -del /f *.bat
1083 cd ..\win32
1084 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1085 -del /f $(CONFIGPM)
1086 -del /f bin\*.bat
827a599d
GS
1087 cd ..
1088 -del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1089 cd win32
9e42cd94 1090 cd $(EXTDIR)
827a599d 1091 -del /s *.def Makefile Makefile.old
9e42cd94
GS
1092 cd ..\win32
1093 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
522078af 1094 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
9e42cd94 1095 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
522078af 1096 -if exist $(COREDIR) rmdir /s $(COREDIR)
9e42cd94
GS
1097
1098install : all installbare installhtml
1099
1100installbare : utils
1101 $(PERLEXE) ..\installperl
1102 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1103 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1104 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1105
1106installhtml : doc
1107 $(RCOPY) html\*.* $(INST_HTML)\*.*
1108
1109inst_lib : $(CONFIGPM)
1110 copy splittree.pl ..
1111 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1112 $(RCOPY) ..\lib $(INST_LIB)\*.*
1113
1114minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1115 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1116 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1117 attrib -r ..\t\*.*
1118 copy test ..\t
1119 cd ..\t
1120 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1121 cd ..\win32
1122
1123test-prep : all utils
1124 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1125 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1126 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1127
1128test : test-prep
1129 cd ..\t
1130 $(PERLEXE) -I..\lib harness
1131 cd ..\win32
1132
1133test-notty : test-prep
1134 set PERL_SKIP_TTY_TEST=1
1135 cd ..\t
1136 $(PERLEXE) -I..\lib harness
1137 cd ..\win32
1138
b4a93add
NK
1139_test :
1140 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1141 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1142 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1143 cd ..\t
1144 $(PERLEXE) -I..\lib harness
1145 cd ..\win32
1146
9e42cd94
GS
1147clean : Extensions_clean
1148 -@$(DEL) miniperlmain$(o)
1149 -@$(DEL) $(MINIPERL)
1150 -@$(DEL) perlglob$(o)
1151 -@$(DEL) perlmain$(o)
1152 -@$(DEL) config.w32
1153 -@$(DEL) config.h
1154 -@$(DEL) $(GLOBEXE)
1155 -@$(DEL) $(PERLEXE)
1156 -@$(DEL) $(WPERLEXE)
1157 -@$(DEL) $(PERLDLL)
1158 -@$(DEL) $(CORE_OBJ)
1159 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
522078af 1160 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
9e42cd94
GS
1161 -@$(DEL) $(WIN32_OBJ)
1162 -@$(DEL) $(DLL_OBJ)
1163 -@$(DEL) $(X2P_OBJ)
1164 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1165 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1166 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1167 -@$(DEL) *.ilk
1168 -@$(DEL) *.pdb
1169
1170# Handy way to run perlbug -ok without having to install and run the
1171# installed perlbug. We don't re-run the tests here - we trust the user.
1172# Please *don't* use this unless all tests pass.
1173# If you want to report test failures, use "nmake nok" instead.
1174ok: utils
1175 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1176
1177okfile: utils
1178 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1179
1180nok: utils
1181 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1182
1183nokfile: utils
1184 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok