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