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