Avoid evaluating a strlen twice due the new implementation
[p5sagit/p5-mst-13.2.git] / win32 / Makefile
CommitLineData
9e42cd94 1#
2# Makefile to build perl on Windows NT using Microsoft NMAKE.
3# Supported compilers:
c623ac67 4# Visual C++ 2.0 through 6.0 (and possibly newer versions)
5# MS Platform SDK 64-bit compiler and tools **experimental**
9e42cd94 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 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#
e01ffb8d 35#INST_VER = \5.9.2
9e42cd94 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 51#
52USE_MULTI = define
53
54#
f7d585d3 55# Beginnings of interpreter cloning/threads; now reasonably complete.
9e42cd94 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 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 74USE_PERLIO = define
75
76#
4a9d6100 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 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 88
89#
90# uncomment next line if you want debug version of perl (big,slow)
f7d585d3 91# If not enabled, we automatically try to use maximum optimization
92# with all compilers that are known to have a working optimizer.
9e42cd94 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 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 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 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 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 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 220!ENDIF
221
9e42cd94 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 242!IF "$(USE_LARGE_FILES)" == ""
243USE_LARGE_FILES = undef
244!ENDIF
245
9e42cd94 246!IF "$(USE_PERLCRT)" == ""
247USE_PERLCRT = undef
248!ENDIF
249
3db8f154 250!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
9e42cd94 251USE_MULTI = define
252!ENDIF
253
254!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
255USE_MULTI = define
9e42cd94 256!ENDIF
257
3db8f154 258!IF "$(USE_MULTI)" != "undef"
9e42cd94 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 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 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 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.
036c1c1e 306DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
9e42cd94 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
9e42cd94 352!IF "$(CFG)" == "Debug"
353! IF "$(CCTYPE)" == "MSVC20"
354OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
355! ELSE
356OPTIMIZE = -Od -MD -Zi -DDEBUGGING
357! ENDIF
c623ac67 358LINK_DBG = -debug
9e42cd94 359!ELSE
ec25c072 360OPTIMIZE = -MD -Zi -DNDEBUG
361# we enable debug symbols in release builds also
362LINK_DBG = -debug -opt:ref,icf
363# you may want to enable this if you want COFF symbols in the executables
364# in addition to the PDB symbols. The default Dr. Watson that ships with
365# Windows can use the the former but not latter. The free WinDbg can be
366# installed to get better stack traces from just the PDB symbols, so we
367# avoid the bloat of COFF symbols by default.
368#LINK_DBG = $(LINK_DBG) -debugtype:both
d921a5fb 369! IF "$(WIN64)" == "define"
370# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
371OPTIMIZE = $(OPTIMIZE) -Ox -GL
372LINK_DBG = $(LINK_DBG) -ltcg
373! ELSE
374# -O1 yields smaller code, which turns out to be faster than -O2 on x86
375OPTIMIZE = $(OPTIMIZE) -O1
376#OPTIMIZE = $(OPTIMIZE) -O2
377! ENDIF
9e42cd94 378!ENDIF
379
c623ac67 380!IF "$(WIN64)" == "define"
381DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
382OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
383!ENDIF
384
9e42cd94 385!IF "$(USE_PERLCRT)" != "define"
386BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
387!ENDIF
388
389LIBBASEFILES = $(CRYPT_LIB) \
390 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
391 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
036c1c1e 392 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
c623ac67 393 version.lib
394
395# win64 doesn't have some libs
396!IF "$(WIN64)" != "define"
397LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
398!ENDIF
9e42cd94 399
400# we add LIBC here, since we may be using PerlCRT.dll
401LIBFILES = $(LIBBASEFILES) $(LIBC)
402
403CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
404 $(PCHFLAGS) $(OPTIMIZE)
405LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
406 -libpath:"$(INST_COREDIR)" \
407 -machine:$(PROCESSOR_ARCHITECTURE)
408OBJOUT_FLAG = -Fo
409EXEOUT_FLAG = -Fe
410
411CFLAGS_O = $(CFLAGS) $(BUILDOPT)
412
413#################### do not edit below this line #######################
414############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
415
416o = .obj
417
418#
419# Rules
420#
421
422.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
423
424.c$(o):
425 $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
426
427.y.c:
428 $(NOOP)
429
430$(o).dll:
431 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
432 -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
433
434.rc.res:
435 $(RSC) -i.. $<
436
437#
438# various targets
439
440# makedef.pl must be updated if this changes, and this should normally
441# only change when there is an incompatible revision of the public API.
78a7c709 442PERLIMPLIB = ..\perl59.lib
443PERLDLL = ..\perl59.dll
9e42cd94 444
445MINIPERL = ..\miniperl.exe
446MINIDIR = .\mini
447PERLEXE = ..\perl.exe
448WPERLEXE = ..\wperl.exe
449GLOBEXE = ..\perlglob.exe
04bae4fb 450CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
9e42cd94 451MINIMOD = ..\lib\ExtUtils\Miniperl.pm
452X2P = ..\x2p\a2p.exe
453
ca12659b 454# Unicode data files generated by mktables
455UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
456 ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
7ebf06b3 457 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
458 ..\lib\unicore\PVA.pl
ca12659b 459
460# Directories of Unicode data files generated by mktables
27a8011f 461UNIDATADIR1 = ..\lib\unicore\To
462UNIDATADIR2 = ..\lib\unicore\lib
ca12659b 463
3890b58f 464PERLEXE_ICO = .\perlexe.ico
465PERLEXE_RES = .\perlexe.res
466PERLDLL_RES =
467
9e42cd94 468# Nominate a target which causes extensions to be re-built
469# This used to be $(PERLEXE), but at worst it is the .dll that they depend
470# on and really only the interface - i.e. the .def file used to export symbols
471# from the .dll
472PERLDEP = perldll.def
473
474PL2BAT = bin\pl2bat.pl
475GLOBBAT = bin\perlglob.bat
476
477UTILS = \
478 ..\utils\h2ph \
479 ..\utils\splain \
480 ..\utils\dprofpp \
481 ..\utils\perlbug \
482 ..\utils\pl2pm \
483 ..\utils\c2ph \
827a599d 484 ..\utils\pstruct \
9e42cd94 485 ..\utils\h2xs \
486 ..\utils\perldoc \
487 ..\utils\perlcc \
488 ..\utils\perlivp \
489 ..\utils\libnetcfg \
827a599d 490 ..\utils\enc2xs \
491 ..\utils\piconv \
83cd6e83 492 ..\utils\cpan \
ea0e987d 493 ..\utils\xsubpp \
4b618757 494 ..\utils\prove \
ea0e987d 495 ..\utils\instmodsh \
9e42cd94 496 ..\pod\checkpods \
497 ..\pod\pod2html \
498 ..\pod\pod2latex \
499 ..\pod\pod2man \
500 ..\pod\pod2text \
501 ..\pod\pod2usage \
502 ..\pod\podchecker \
503 ..\pod\podselect \
504 ..\x2p\find2perl \
827a599d 505 ..\x2p\psed \
9e42cd94 506 ..\x2p\s2p \
9e42cd94 507 bin\exetype.pl \
508 bin\runperl.pl \
509 bin\pl2bat.pl \
510 bin\perlglob.pl \
511 bin\search.pl
512
513MAKE = nmake -nologo
514MAKE_BARE = nmake
515
c623ac67 516!IF "$(WIN64)" == "define"
517CFGSH_TMPL = config.vc64
518CFGH_TMPL = config_H.vc64
519!ELSE
9e42cd94 520CFGSH_TMPL = config.vc
521CFGH_TMPL = config_H.vc
c623ac67 522!ENDIF
9e42cd94 523
524XCOPY = xcopy /f /r /i /d
525RCOPY = xcopy /f /r /i /e /d
526NOOP = @echo
527NULL =
528
529DEL = del
530
531#
532# filenames given to xsubpp must have forward slashes (since it puts
533# full pathnames in #line strings)
534XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
535 -C++ -prototypes
536
537MICROCORE_SRC = \
538 ..\av.c \
539 ..\deb.c \
540 ..\doio.c \
541 ..\doop.c \
542 ..\dump.c \
543 ..\globals.c \
544 ..\gv.c \
545 ..\hv.c \
546 ..\locale.c \
547 ..\mg.c \
548 ..\numeric.c \
549 ..\op.c \
295f0f84 550 ..\pad.c \
9e42cd94 551 ..\perl.c \
552 ..\perlapi.c \
553 ..\perly.c \
554 ..\pp.c \
555 ..\pp_ctl.c \
556 ..\pp_hot.c \
557 ..\pp_pack.c \
558 ..\pp_sort.c \
559 ..\pp_sys.c \
10bc17b6 560 ..\reentr.c \
9e42cd94 561 ..\regcomp.c \
562 ..\regexec.c \
563 ..\run.c \
564 ..\scope.c \
565 ..\sv.c \
566 ..\taint.c \
567 ..\toke.c \
568 ..\universal.c \
569 ..\utf8.c \
570 ..\util.c \
571 ..\xsutils.c
572
573EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
574
575!IF "$(PERL_MALLOC)" == "define"
576EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
577!ENDIF
578
579EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
580
581WIN32_SRC = \
582 .\win32.c \
583 .\win32sck.c \
584 .\win32thread.c
585
f7d585d3 586# We need this for miniperl build unless we override canned
587# config.h #define building mini\*
588#!IF "$(USE_PERLIO)" == "define"
9e42cd94 589WIN32_SRC = $(WIN32_SRC) .\win32io.c
f7d585d3 590#!ENDIF
9e42cd94 591
592!IF "$(CRYPT_SRC)" != ""
593WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
594!ENDIF
595
596DLL_SRC = $(DYNALOADER).c
597
598X2P_SRC = \
599 ..\x2p\a2p.c \
600 ..\x2p\hash.c \
601 ..\x2p\str.c \
602 ..\x2p\util.c \
603 ..\x2p\walk.c
604
605CORE_NOCFG_H = \
606 ..\av.h \
607 ..\cop.h \
608 ..\cv.h \
609 ..\dosish.h \
610 ..\embed.h \
611 ..\form.h \
612 ..\gv.h \
613 ..\handy.h \
614 ..\hv.h \
615 ..\iperlsys.h \
616 ..\mg.h \
617 ..\nostdio.h \
618 ..\op.h \
619 ..\opcode.h \
620 ..\perl.h \
621 ..\perlapi.h \
622 ..\perlsdio.h \
623 ..\perlsfio.h \
624 ..\perly.h \
625 ..\pp.h \
626 ..\proto.h \
627 ..\regexp.h \
628 ..\scope.h \
629 ..\sv.h \
630 ..\thread.h \
631 ..\unixish.h \
632 ..\utf8.h \
633 ..\util.h \
634 ..\warnings.h \
635 ..\XSUB.h \
636 ..\EXTERN.h \
637 ..\perlvars.h \
638 ..\intrpvar.h \
639 ..\thrdvar.h \
640 .\include\dirent.h \
641 .\include\netdb.h \
642 .\include\sys\socket.h \
643 .\win32.h
644
645CORE_H = $(CORE_NOCFG_H) .\config.h
646
647MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
648CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
649WIN32_OBJ = $(WIN32_SRC:.c=.obj)
650MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
651 $(MINIDIR)\miniperlmain$(o) \
652 $(MINIDIR)\perlio$(o)
653MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
654MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
655DLL_OBJ = $(DLL_SRC:.c=.obj)
656X2P_OBJ = $(X2P_SRC:.c=.obj)
657
658PERLDLL_OBJ = $(CORE_OBJ)
659PERLEXE_OBJ = perlmain$(o)
660
661PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
662#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
663
664!IF "$(USE_SETARGV)" != ""
665SETARGV_OBJ = setargv$(o)
666!ENDIF
667
668DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
669SOCKET = $(EXTDIR)\Socket\Socket
670FCNTL = $(EXTDIR)\Fcntl\Fcntl
671OPCODE = $(EXTDIR)\Opcode\Opcode
672SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
673IO = $(EXTDIR)\IO\IO
674POSIX = $(EXTDIR)\POSIX\POSIX
675ATTRS = $(EXTDIR)\attrs\attrs
676THREAD = $(EXTDIR)\Thread\Thread
677B = $(EXTDIR)\B\B
678RE = $(EXTDIR)\re\re
679DUMPER = $(EXTDIR)\Data\Dumper\Dumper
680ERRNO = $(EXTDIR)\Errno\Errno
681PEEK = $(EXTDIR)\Devel\Peek\Peek
682BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
683DPROF = $(EXTDIR)\Devel\DProf\DProf
684GLOB = $(EXTDIR)\File\Glob\Glob
685HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
686STORABLE = $(EXTDIR)\Storable\Storable
687FILTER = $(EXTDIR)\Filter\Util\Call\Call
688ENCODE = $(EXTDIR)\Encode\Encode
689MD5 = $(EXTDIR)\Digest\MD5\MD5
e934609f 690PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
9e42cd94 691MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
692TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
693CWD = $(EXTDIR)\Cwd\Cwd
694LISTUTIL = $(EXTDIR)\List\Util\Util
e934609f 695PERLIOVIA = $(EXTDIR)\PerlIO\via\via
83e2e978 696XSAPITEST = $(EXTDIR)\XS\APItest\APItest
9e42cd94 697XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
698UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
b4ad57f4 699WIN32_DIR = ext\Win32
9e42cd94 700
701SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
702FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
703OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
704SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
705IO_DLL = $(AUTODIR)\IO\IO.dll
706POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
707ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
708THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
709B_DLL = $(AUTODIR)\B\B.dll
710DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
711PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
712RE_DLL = $(AUTODIR)\re\re.dll
713BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
714DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
715GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
716HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
717STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
718FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
719ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
720MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
e934609f 721PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
9e42cd94 722MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
723TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
724CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
725LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
e934609f 726PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
83e2e978 727XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
9e42cd94 728XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
729UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
b4ad57f4 730WIN32_DLL = $(AUTODIR)\Win32\Win32.dll
9e42cd94 731
732EXTENSION_C = \
733 $(SOCKET).c \
734 $(FCNTL).c \
735 $(OPCODE).c \
736 $(SDBM_FILE).c \
737 $(IO).c \
738 $(POSIX).c \
739 $(ATTRS).c \
740 $(THREAD).c \
741 $(RE).c \
742 $(DUMPER).c \
743 $(PEEK).c \
744 $(B).c \
745 $(BYTELOADER).c \
746 $(DPROF).c \
747 $(GLOB).c \
748 $(HOSTNAME).c \
749 $(STORABLE).c \
750 $(FILTER).c \
751 $(ENCODE).c \
752 $(MD5).c \
753 $(PERLIOSCALAR).c \
754 $(MIMEBASE64).c \
755 $(TIMEHIRES).c \
756 $(CWD).c \
757 $(LISTUTIL).c \
758 $(PERLIOVIA).c \
83e2e978 759 $(XSAPITEST).c \
9e42cd94 760 $(XSTYPEMAP).c \
b4ad57f4 761 $(UNICODENORMALIZE).c \
762 $(WIN32_DIR).c
9e42cd94 763
764EXTENSION_DLL = \
765 $(SOCKET_DLL) \
766 $(FCNTL_DLL) \
767 $(OPCODE_DLL) \
768 $(SDBM_FILE_DLL)\
769 $(IO_DLL) \
770 $(POSIX_DLL) \
771 $(ATTRS_DLL) \
772 $(DUMPER_DLL) \
773 $(PEEK_DLL) \
774 $(B_DLL) \
775 $(RE_DLL) \
776 $(THREAD_DLL) \
777 $(BYTELOADER_DLL) \
778 $(DPROF_DLL) \
779 $(GLOB_DLL) \
780 $(HOSTNAME_DLL) \
781 $(STORABLE_DLL) \
782 $(FILTER_DLL) \
783 $(ENCODE_DLL) \
784 $(MD5_DLL) \
785 $(PERLIOSCALAR_DLL) \
786 $(MIMEBASE64_DLL) \
787 $(TIMEHIRES_DLL) \
788 $(CWD_DLL) \
789 $(LISTUTIL_DLL) \
790 $(PERLIOVIA_DLL) \
83e2e978 791 $(XSAPITEST_DLL) \
9e42cd94 792 $(XSTYPEMAP_DLL) \
b4ad57f4 793 $(UNICODENORMALIZE_DLL) \
794 $(WIN32_DLL)
9e42cd94 795
796POD2HTML = $(PODDIR)\pod2html
797POD2MAN = $(PODDIR)\pod2man
798POD2LATEX = $(PODDIR)\pod2latex
799POD2TEXT = $(PODDIR)\pod2text
800
801CFG_VARS = \
802 "INST_DRV=$(INST_DRV)" \
803 "INST_TOP=$(INST_TOP)" \
804 "INST_VER=$(INST_VER)" \
805 "INST_ARCH=$(INST_ARCH)" \
806 "archname=$(ARCHNAME)" \
807 "cc=$(CC)" \
808 "ld=$(LINK32)" \
809 "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
810 "cf_email=$(EMAIL)" \
811 "d_crypt=$(D_CRYPT)" \
812 "d_mymalloc=$(PERL_MALLOC)" \
813 "libs=$(LIBFILES)" \
814 "incpath=$(CCINCDIR:"=\")" \
815 "libperl=$(PERLIMPLIB:..\=)" \
816 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
817 "libc=$(LIBC)" \
818 "make=$(MAKE_BARE)" \
d2b25974 819 "static_ext=$(STATIC_EXT)" \
7e0017d3 820 "usethreads=$(USE_ITHREADS)" \
9e42cd94 821 "useithreads=$(USE_ITHREADS)" \
9e42cd94 822 "usemultiplicity=$(USE_MULTI)" \
823 "useperlio=$(USE_PERLIO)" \
4a9d6100 824 "uselargefiles=$(USE_LARGE_FILES)" \
9e42cd94 825 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
826 "optimize=$(OPTIMIZE:"=\")"
827
828#
829# Top targets
830#
831
ca12659b 832all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
9e42cd94 833 $(X2P) Extensions
834 @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
835
836$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
837
838#------------------------------------------------------------
839
840$(GLOBEXE) : perlglob$(o)
841 $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
842 perlglob$(o) setargv$(o)
843
844perlglob$(o) : perlglob.c
845
846config.w32 : $(CFGSH_TMPL)
847 copy $(CFGSH_TMPL) config.w32
848
849.\config.h : $(CFGH_TMPL)
850 -del /f config.h
851 copy $(CFGH_TMPL) config.h
852
853..\config.sh : config.w32 $(MINIPERL) config_sh.PL
854 $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
855
856# this target is for when changes to the main config.sh happen
857# edit config.{b,v,g}c and make this target once for each supported
858# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
859regen_config_h:
860 perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
861 cd ..
8839b9e4 862 -del /f perl.exe perl*.dll
9e42cd94 863 perl configpm
864 cd win32
865 -del /f $(CFGH_TMPL)
866 -mkdir $(COREDIR)
8839b9e4 867 -perl config_h.PL "INST_VER=$(INST_VER)"
9e42cd94 868 rename config.h $(CFGH_TMPL)
869
870$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
871 cd ..
872 miniperl configpm
873 cd win32
874 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
875 $(XCOPY) ..\*.h $(COREDIR)\*.*
876 $(XCOPY) *.h $(COREDIR)\*.*
877 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
878 $(RCOPY) include $(COREDIR)\*.*
879 -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
880 if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
881
882$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
883 $(LINK32) -subsystem:console -out:$@ @<<
884 $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
885<<
886
887$(MINIDIR) :
888 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
889
890$(MINICORE_OBJ) : $(CORE_NOCFG_H)
891 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
892
893$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
894 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
895
896# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
897# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
898!IF "$(USE_IMP_SYS)" == "define"
899perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
900 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
901!ENDIF
902
903# 1. we don't want to rebuild miniperl.exe when config.h changes
904# 2. we don't want to rebuild miniperl.exe with non-default config.h
905$(MINI_OBJ) : $(CORE_NOCFG_H)
906
907$(WIN32_OBJ) : $(CORE_H)
908$(CORE_OBJ) : $(CORE_H)
909$(DLL_OBJ) : $(CORE_H)
910$(X2P_OBJ) : $(CORE_H)
911
912perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
913 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
914 CCTYPE=$(CCTYPE) > perldll.def
915
916$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
917 $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
918 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
919<<
920 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
921
e84ac4e2 922$(PERLEXE_ICO): $(MINIPERL) makeico.pl
923 $(MINIPERL) makeico.pl > $@
924
925$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
926
9e42cd94 927$(MINIMOD) : $(MINIPERL) ..\minimod.pl
928 cd ..
929 miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
930 cd win32
931
932..\x2p\a2p$(o) : ..\x2p\a2p.c
933 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
934
935..\x2p\hash$(o) : ..\x2p\hash.c
936 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
937
938..\x2p\str$(o) : ..\x2p\str.c
939 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
940
941..\x2p\util$(o) : ..\x2p\util.c
942 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
943
944..\x2p\walk$(o) : ..\x2p\walk.c
945 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
946
947$(X2P) : $(MINIPERL) $(X2P_OBJ)
948 $(MINIPERL) ..\x2p\find2perl.PL
949 $(MINIPERL) ..\x2p\s2p.PL
950 $(LINK32) -subsystem:console -out:$@ @<<
951 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
952<<
953
954perlmain.c : runperl.c
955 copy runperl.c perlmain.c
956
957perlmain$(o) : perlmain.c
958 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
959
960$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
961 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
962 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
963 copy $(PERLEXE) $(WPERLEXE)
964 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
965 copy splittree.pl ..
966 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
967
968$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
969 if not exist $(AUTODIR) mkdir $(AUTODIR)
970 cd $(EXTDIR)\$(*B)
971 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
972 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
973 cd ..\..\win32
974 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
975 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
976 cd $(EXTDIR)\$(*B)
977 $(XSUBPP) dl_win32.xs > $(*B).c
978 cd ..\..\win32
979
980$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
981 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
982
983#----------------------------------------------------------------------------------
984Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
985 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
b4ad57f4 986 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
9e42cd94 987
6c85d12e 988# Note: The next two targets explicitly remove a "blibdirs.exists" file that
989# currerntly gets left behind, until CPAN RT Ticket #5616 is resolved.
990
9e42cd94 991Extensions_clean:
992 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
b4ad57f4 993 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
6c85d12e 994 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
9e42cd94 995
b4dc1df6 996Extensions_realclean:
997 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean
b4ad57f4 998 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean
6c85d12e 999 -if exist $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists del /f $(EXTDIR)\SDBM_File\sdbm\blibdirs.exists
b4dc1df6 1000
9e42cd94 1001#----------------------------------------------------------------------------------
1002
1003doc: $(PERLEXE)
1004 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1005 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
1006 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1007
b0b6bf2b 1008# Note that this next section is parsed (and regenerated) by pod/buildtoc
1009# so please check that script before making structural changes here
1010
9e42cd94 1011utils: $(PERLEXE) $(X2P)
1012 cd ..\utils
1013 $(MAKE) PERL=$(MINIPERL)
1014 cd ..\pod
4cb44f92 1015 copy ..\vms\perlvms.pod .\perlvms.pod
b0b6bf2b 1016 copy ..\README.aix ..\pod\perlaix.pod
1017 copy ..\README.amiga ..\pod\perlamiga.pod
1018 copy ..\README.apollo ..\pod\perlapollo.pod
1019 copy ..\README.beos ..\pod\perlbeos.pod
1020 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1021 copy ..\README.ce ..\pod\perlce.pod
1022 copy ..\README.cn ..\pod\perlcn.pod
1023 copy ..\README.cygwin ..\pod\perlcygwin.pod
1024 copy ..\README.dgux ..\pod\perldgux.pod
1025 copy ..\README.dos ..\pod\perldos.pod
1026 copy ..\README.epoc ..\pod\perlepoc.pod
1027 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1028 copy ..\README.hpux ..\pod\perlhpux.pod
1029 copy ..\README.hurd ..\pod\perlhurd.pod
1030 copy ..\README.irix ..\pod\perlirix.pod
1031 copy ..\README.jp ..\pod\perljp.pod
1032 copy ..\README.ko ..\pod\perlko.pod
1033 copy ..\README.machten ..\pod\perlmachten.pod
1034 copy ..\README.macos ..\pod\perlmacos.pod
1035 copy ..\README.macosx ..\pod\perlmacosx.pod
1036 copy ..\README.mint ..\pod\perlmint.pod
1037 copy ..\README.mpeix ..\pod\perlmpeix.pod
1038 copy ..\README.netware ..\pod\perlnetware.pod
1039 copy ..\README.os2 ..\pod\perlos2.pod
1040 copy ..\README.os390 ..\pod\perlos390.pod
1041 copy ..\README.os400 ..\pod\perlos400.pod
1042 copy ..\README.plan9 ..\pod\perlplan9.pod
1043 copy ..\README.qnx ..\pod\perlqnx.pod
1044 copy ..\README.solaris ..\pod\perlsolaris.pod
1045 copy ..\README.tru64 ..\pod\perltru64.pod
1046 copy ..\README.tw ..\pod\perltw.pod
1047 copy ..\README.uts ..\pod\perluts.pod
1048 copy ..\README.vmesa ..\pod\perlvmesa.pod
1049 copy ..\README.vms ..\pod\perlvms.pod
1050 copy ..\README.vos ..\pod\perlvos.pod
1051 copy ..\README.win32 ..\pod\perlwin32.pod
e0eb806d 1052 copy ..\pod\perl592delta.pod ..\pod\perldelta.pod
9e42cd94 1053 $(MAKE) -f ..\win32\pod.mak converters
1054 cd ..\lib
1055 $(PERLEXE) lib_pm.PL
1056 cd ..\win32
1057 $(PERLEXE) $(PL2BAT) $(UTILS)
1058
b0b6bf2b 1059# Note that the pod cleanup in this next section is parsed (and regenerated
1060# by pod/buildtoc so please check that script before making changes here
1061
522078af 1062# the doubled rmdir calls are needed because older cmd shells
1063# don't understand /q
b4dc1df6 1064distclean: realclean
9e42cd94 1065 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1066 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1067 -del /f *.def *.map
1068 -del /f $(EXTENSION_DLL)
1069 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1070 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
ca67812f 1071 -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
1072 -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
1073 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1074 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
9e42cd94 1075 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
b4dc1df6 1076 -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm
9e42cd94 1077 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1078 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1079 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1080 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
ca67812f 1081 -del /f $(LIBDIR)\ByteLoader.pm
9e42cd94 1082 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
ca67812f 1083 -del /f $(LIBDIR)\Devel\PPPort.pm
9e42cd94 1084 -del /f $(LIBDIR)\File\Glob.pm
1085 -del /f $(LIBDIR)\Storable.pm
9e42cd94 1086 -del /f $(LIBDIR)\Digest\MD5.pm
ca67812f 1087 -del /f $(LIBDIR)\PerlIO\encoding.pm
e934609f 1088 -del /f $(LIBDIR)\PerlIO\scalar.pm
1089 -del /f $(LIBDIR)\PerlIO\via.pm
ca67812f 1090 -del /f $(LIBDIR)\Sys\Hostname.pm
1091 -del /f $(LIBDIR)\Thread\Signal.pm $(LIBDIR)\Thread\Specific.pm
1092 -del /f $(LIBDIR)\threads\shared.pm
9e42cd94 1093 -del /f $(LIBDIR)\Time\HiRes.pm
9e42cd94 1094 -del /f $(LIBDIR)\Unicode\Normalize.pm
b4ad57f4 1095 -del /f $(LIBDIR)\Win32.pm
9e42cd94 1096 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
522078af 1097 -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
9e42cd94 1098 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
522078af 1099 -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
9e42cd94 1100 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
522078af 1101 -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
ca67812f 1102 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1103 -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
9e42cd94 1104 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
522078af 1105 -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
9e42cd94 1106 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
522078af 1107 -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
9e42cd94 1108 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
522078af 1109 -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
9e42cd94 1110 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
522078af 1111 -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
6c4b87ea 1112 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1113 -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
1114 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1115 -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
9e42cd94 1116 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
522078af 1117 -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
ca67812f 1118 -cd $(PODDIR) && del /f *.html *.bat checkpods \
9e42cd94 1119 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
b0b6bf2b 1120 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1400179b 1121 perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
1122 perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
1123 perljp.pod perlko.pod perlmachten.pod perlmacos.pod \
1124 perlmacosx.pod perlmint.pod perlmpeix.pod perlnetware.pod \
1125 perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
1126 perlqnx.pod perlsolaris.pod perltru64.pod perltw.pod \
e0eb806d 1127 perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
1128 perlwin32.pod \
b0b6bf2b 1129 pod2html pod2latex pod2man pod2text pod2usage \
9e42cd94 1130 podchecker podselect
ca67812f 1131 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1132 perldoc perlivp dprofpp perlcc libnetcfg enc2xs piconv cpan *.bat \
1133 xsubpp instmodsh prove
1134 -cd ..\x2p && del /f find2perl s2p psed *.bat
9e42cd94 1135 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1136 -del /f $(CONFIGPM)
1137 -del /f bin\*.bat
ec25c072 1138 -del /f $(PERLEXE_ICO) perl.base
ca67812f 1139 -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
1140 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
9e42cd94 1141 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
522078af 1142 -if exist $(AUTODIR) rmdir /s $(AUTODIR)
9e42cd94 1143 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
522078af 1144 -if exist $(COREDIR) rmdir /s $(COREDIR)
9e42cd94 1145
1146install : all installbare installhtml
1147
1148installbare : utils
1149 $(PERLEXE) ..\installperl
1150 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1151 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
ec25c072 1152 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1153 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
9e42cd94 1154 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1155
1156installhtml : doc
1157 $(RCOPY) html\*.* $(INST_HTML)\*.*
1158
1159inst_lib : $(CONFIGPM)
1160 copy splittree.pl ..
1161 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1162 $(RCOPY) ..\lib $(INST_LIB)\*.*
1163
ca12659b 1164$(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
27a8011f 1165 cd ..\lib\unicore && \
1166 ..\$(MINIPERL) -I.. mktables
ca12659b 1167
1168minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
6c85d12e 1169 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1170 if exist ..\t\perl.exe del /f ..\t\perl.exe
1171 rename ..\t\miniperl.exe perl.exe
9e42cd94 1172 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1173 attrib -r ..\t\*.*
6c85d12e 1174 cd ..\t && \
1175 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
9e42cd94 1176
1177test-prep : all utils
1178 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1179 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1180 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1181
1182test : test-prep
1183 cd ..\t
1184 $(PERLEXE) -I..\lib harness
1185 cd ..\win32
1186
1187test-notty : test-prep
1188 set PERL_SKIP_TTY_TEST=1
1189 cd ..\t
1190 $(PERLEXE) -I..\lib harness
1191 cd ..\win32
1192
b4a93add 1193_test :
1194 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1195 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1196 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1197 cd ..\t
1198 $(PERLEXE) -I..\lib harness
1199 cd ..\win32
1200
27a8011f 1201# the doubled rmdir calls are needed because older cmd shells
1202# don't understand /q
b4dc1df6 1203_clean :
9e42cd94 1204 -@$(DEL) miniperlmain$(o)
1205 -@$(DEL) $(MINIPERL)
1206 -@$(DEL) perlglob$(o)
1207 -@$(DEL) perlmain$(o)
1208 -@$(DEL) config.w32
1209 -@$(DEL) config.h
1210 -@$(DEL) $(GLOBEXE)
1211 -@$(DEL) $(PERLEXE)
1212 -@$(DEL) $(WPERLEXE)
1213 -@$(DEL) $(PERLDLL)
1214 -@$(DEL) $(CORE_OBJ)
1215 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
522078af 1216 -if exist $(MINIDIR) rmdir /s $(MINIDIR)
27a8011f 1217 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1218 -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
1219 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1220 -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
ca12659b 1221 -@$(DEL) $(UNIDATAFILES)
27a8011f 1222 -@$(DEL) $(WIN32_OBJ)
9e42cd94 1223 -@$(DEL) $(DLL_OBJ)
1224 -@$(DEL) $(X2P_OBJ)
1225 -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1226 -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1227 -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1228 -@$(DEL) *.ilk
1229 -@$(DEL) *.pdb
1230
b4dc1df6 1231clean : Extensions_clean _clean
1232
1233realclean : Extensions_realclean _clean
1234
9e42cd94 1235# Handy way to run perlbug -ok without having to install and run the
1236# installed perlbug. We don't re-run the tests here - we trust the user.
1237# Please *don't* use this unless all tests pass.
1238# If you want to report test failures, use "nmake nok" instead.
1239ok: utils
1240 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1241
1242okfile: utils
1243 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1244
1245nok: utils
1246 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1247
1248nokfile: utils
1249 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok