This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(retracted by #12951)
[perl5.git] / win32 / makefile.mk
CommitLineData
1e71036e
JH
1#
2# Makefile to build perl on Windows NT using DMAKE.
3# Supported compilers:
4# Visual C++ 2.0 thro 6.0
5# Borland C++ 5.02
6# Mingw32 with gcc-2.95.2 or better **experimental**
7#
8# This is set up to build a perl.exe that runs off a shared library
9# (perl57.dll). Also makes individual DLLs for the XS extensions.
10#
11
12##
13## Make sure you read README.win32 *before* you mess with anything here!
14##
15
16##
17## Build configuration. Edit the values below to suit your needs.
18##
19
20#
21# Set these to wherever you want "dmake install" to put your
22# newly built perl.
23#
24INST_DRV *= c:
25INST_TOP *= $(INST_DRV)\perl
26
27#
28# Comment this out if you DON'T want your perl installation to be versioned.
29# This means that the new installation will overwrite any files from the
30# old installation at the same INST_TOP location. Leaving it enabled is
31# the safest route, as perl adds the extra version directory to all the
32# locations it installs files to. If you disable it, an alternative
33# versioned installation can be obtained by setting INST_TOP above to a
34# path that includes an arbitrary version string.
35#
36INST_VER *= \5.7.2
37
38#
39# Comment this out if you DON'T want your perl installation to have
40# architecture specific components. This means that architecture-
41# specific files will be installed along with the architecture-neutral
42# files. Leaving it enabled is safer and more flexible, in case you
43# want to build multiple flavors of perl and install them together in
44# the same location. Commenting it out gives you a simpler
45# installation that is easier to understand for beginners.
46#
47INST_ARCH *= \$(ARCHNAME)
48
49#
50# uncomment to enable multiple interpreters. This is need for fork()
51# emulation.
52#
53USE_MULTI *= define
54
55#
56# Beginnings of interpreter cloning/threads; still very incomplete.
57# This should be enabled to get the fork() emulation. This needs
58# USE_MULTI as well.
59#
60USE_ITHREADS *= define
61
62#
63# uncomment to enable the implicit "host" layer for all system calls
64# made by perl. This needs USE_MULTI above. This is also needed to
65# get fork().
66#
67USE_IMP_SYS *= define
68
69#
70# uncomment to enable the experimental PerlIO I/O subsystem.
71USE_PERLIO = define
72
73#
74# WARNING! This option is deprecated and will eventually go away (enable
75# USE_ITHREADS instead).
76#
77# uncomment to enable threads-capabilities. This is incompatible with
78# USE_ITHREADS, and is only here for people who may have come to rely
79# on the experimental Thread support that was in 5.005.
80#
81#USE_5005THREADS *= define
82
83#
1e71036e
JH
84# uncomment exactly one of the following
85#
86# Visual C++ 2.x
87#CCTYPE *= MSVC20
88# Visual C++ > 2.x and < 6.x
89#CCTYPE *= MSVC
90# Visual C++ >= 6.x
91CCTYPE *= MSVC60
92# Borland 5.02 or later
93#CCTYPE *= BORLAND
94# mingw32+gcc-2.95.2 or better
95#CCTYPE *= GCC
96
97#
98# uncomment this if your Borland compiler is older than v5.4.
99BCCOLD = define
100#
101# uncomment this if you want to use Borland's VCL as your CRT
102#BCCVCL = define
103
104#
105# uncomment this if you are compiling under Windows 95/98 and command.com
106# (not needed if you're running under 4DOS/NT 6.01 or later)
107#IS_WIN95 *= define
108
109#
110# uncomment next line if you want debug version of perl (big,slow)
111# If not enabled, we automatically try to use maximum optimization
112# with all compilers that are known to have a working optimizer.
113#
114CFG *= Debug
115
116#
117# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
118# It has patches that fix known bugs in older versions of MSVCRT.DLL.
119# This currently requires VC 5.0 with Service Pack 3 or later.
468f45d5 120# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
1e71036e
JH
121# and follow the directions in the package to install.
122#
123# Not recommended if you have VC 6.x and you're not running Windows 9x.
124#
125#USE_PERLCRT *= define
126
127#
128# uncomment to enable linking with setargv.obj under the Visual C
129# compiler. Setting this options enables perl to expand wildcards in
130# arguments, but it may be harder to use alternate methods like
131# File::DosGlob that are more powerful. This option is supported only with
132# Visual C.
133#
134#USE_SETARGV *= define
135
136#
137# if you have the source for des_fcrypt(), uncomment this and make sure the
138# file exists (see README.win32). File should be located in the same
139# directory as this file.
140#
141#CRYPT_SRC *= fcrypt.c
142
143#
144# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
145# library, uncomment this, and make sure the library exists (see README.win32)
146# Specify the full pathname of the library.
147#
148#CRYPT_LIB *= fcrypt.lib
149
150#
151# set this if you wish to use perl's malloc
152# WARNING: Turning this on/off WILL break binary compatibility with extensions
153# you may have compiled with/without it. Be prepared to recompile all
154# extensions if you change the default. Currently, this cannot be enabled
155# if you ask for USE_IMP_SYS above.
156#
157#PERL_MALLOC *= define
158
159#
160# set the install locations of the compiler include/libraries
161# Running VCVARS32.BAT is *required* when using Visual C.
162# Some versions of Visual C don't define MSVCDIR in the environment,
163# so you may have to set CCHOME explicitly (spaces in the path name should
164# not be quoted)
165#
166#CCHOME *= F:\borland\bc5
167CCHOME *= $(MSVCDIR)
168#CCHOME *= c:\gcc-2.95.2
169CCINCDIR *= $(CCHOME)\include
170CCLIBDIR *= $(CCHOME)\lib
171
172#
173# Additional compiler flags can be specified here.
174#
175
176#
177# This should normally be disabled. Adding -DPERL_POLLUTE enables support
178# for old symbols by default, at the expense of extreme pollution. You most
179# probably just want to build modules that won't compile with
180# perl Makefile.PL POLLUTE=1
181# instead of enabling this. Please report such modules to the respective
182# authors.
183#
184#BUILDOPT += -DPERL_POLLUTE
185
186#
187# This should normally be disabled. Enabling it will disable the File::Glob
188# implementation of CORE::glob.
189#
190#BUILDOPT += -DPERL_EXTERNAL_GLOB
191
192#
193# This should normally be disabled. Enabling it causes perl to read scripts
194# in text mode (which is the 5.005 behavior) and will break ByteLoader.
195#BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
196
197#
198# specify semicolon-separated list of extra directories that modules will
199# look for libraries (spaces in path names need not be quoted)
200#
201EXTRALIBDIRS *=
202
203#
204# set this to point to cmd.exe (only needed if you use some
205# alternate shell that doesn't grok cmd.exe style commands)
206#
207#SHELL *= g:\winnt\system32\cmd.exe
208
209#
210# set this to your email address (perl will guess a value from
211# from your loginname and your hostname, which may not be right)
212#
213#EMAIL *=
214
215##
216## Build configuration ends.
217##
218
219##################### CHANGE THESE ONLY IF YOU MUST #####################
220
221.IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
222D_CRYPT = undef
223.ELSE
224D_CRYPT = define
225CRYPT_FLAG = -DHAVE_DES_FCRYPT
226.ENDIF
227
1e71036e
JH
228PERL_MALLOC *= undef
229
230USE_5005THREADS *= undef
231
232.IF "$(USE_5005THREADS)" == "define"
233USE_ITHREADS != undef
234.ENDIF
235
236.IF "$(USE_IMP_SYS)" == "define"
237PERL_MALLOC != undef
238.ENDIF
239
240USE_MULTI *= undef
1e71036e
JH
241USE_ITHREADS *= undef
242USE_IMP_SYS *= undef
243USE_PERLIO *= undef
244USE_PERLCRT *= undef
245
acfe0abc 246.IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
1e71036e
JH
247USE_MULTI != define
248.ENDIF
249
acfe0abc 250.IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
1e71036e
JH
251USE_MULTI != define
252USE_5005THREADS != undef
253.ENDIF
254
acfe0abc 255.IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
1e71036e
JH
256BUILDOPT += -DPERL_IMPLICIT_CONTEXT
257.ENDIF
258
259.IF "$(USE_IMP_SYS)" != "undef"
260BUILDOPT += -DPERL_IMPLICIT_SYS
261.ENDIF
262
263.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
264
265PROCESSOR_ARCHITECTURE *= x86
266
acfe0abc 267.IF "$(USE_5005THREADS)" == "define"
1e71036e
JH
268ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
269.ELIF "$(USE_MULTI)" == "define"
270ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
271.ELSE
272.IF "$(USE_PERLIO)" == "define"
273ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
274.ELSE
275ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
276.ENDIF
277ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
278.ENDIF
279
280.IF "$(USE_ITHREADS)" == "define"
281ARCHNAME !:= $(ARCHNAME)-thread
282.ENDIF
283
284# Visual Studio 98 specific
285.IF "$(CCTYPE)" == "MSVC60"
286
287# VC 6.0 can load the socket dll on demand. Makes the test suite
288# run in about 10% less time.
289DELAYLOAD *= -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
290
291.IF "$(CFG)" == "Debug"
292.ELSE
293# VC 6.0 seems capable of compiling perl correctly with optimizations
294# enabled. Anything earlier fails tests.
295CFG *= Optimize
296.ENDIF
297.ENDIF
298
299ARCHDIR = ..\lib\$(ARCHNAME)
300COREDIR = ..\lib\CORE
301AUTODIR = ..\lib\auto
302LIBDIR = ..\lib
303EXTDIR = ..\ext
304PODDIR = ..\pod
305EXTUTILSDIR = $(LIBDIR)\ExtUtils
306
307#
308INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
309INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
310INST_LIB = $(INST_TOP)$(INST_VER)\lib
311INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
312INST_COREDIR = $(INST_ARCHLIB)\CORE
313INST_POD = $(INST_LIB)\pod
314INST_HTML = $(INST_TOP)$(INST_VER)\html
315
316#
317# Programs to compile, build .lib files and link
318#
319
320.USESHELL :
321
322.IF "$(CCTYPE)" == "BORLAND"
323
324CC = bcc32
325.IF "$(BCCOLD)" != "define"
326LINK32 = ilink32
327.ELSE
328LINK32 = tlink32
329.ENDIF
330LIB32 = tlib /P128
331IMPLIB = implib -c
332RSC = rc
333
334#
335# Options
336#
337INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
338#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
339DEFINES = -DWIN32 $(CRYPT_FLAG)
340LOCDEFS = -DPERLDLL -DPERL_CORE
341SUBSYS = console
342CXX_FLAG = -P
343
344LIBC = cw32mti.lib
345LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC)
346
347.IF "$(CFG)" == "Debug"
348OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
349LINK_DBG = -v
350.ELSE
351OPTIMIZE = -O2 -D_RTLDLL
352LINK_DBG =
353.ENDIF
354
355CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
356 $(PCHFLAGS) $(OPTIMIZE)
357LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
358OBJOUT_FLAG = -o
359EXEOUT_FLAG = -e
360LIBOUT_FLAG =
361.IF "$(BCCOLD)" != "define"
362LINK_FLAGS += -Gn
363DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410
364.END
365.IF "$(BCCVCL)" == "define"
366LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
367LINK_FLAGS += -L"$(CCLIBDIR)\Release"
368.END
369
370
371.ELIF "$(CCTYPE)" == "GCC"
372
373CC = gcc
374LINK32 = gcc
375LIB32 = ar rc
376IMPLIB = dlltool
377RSC = rc
378
379i = .i
380o = .o
381a = .a
382
383#
384# Options
385#
386
387INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
388DEFINES = -DWIN32 $(CRYPT_FLAG)
389LOCDEFS = -DPERLDLL -DPERL_CORE
390SUBSYS = console
391CXX_FLAG = -xc++
392
393LIBC = -lmsvcrt
394
395# same libs as MSVC
396LIBFILES = $(CRYPT_LIB) $(LIBC) \
397 -lmoldname -lkernel32 -luser32 -lgdi32 \
398 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
399 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr \
400 -lwinmm -lversion -lodbc32
401
402.IF "$(CFG)" == "Debug"
403OPTIMIZE = -g -O2 -DDEBUGGING
404LINK_DBG = -g
405.ELSE
406OPTIMIZE = -g -O2
407LINK_DBG = -g
408.ENDIF
409
410CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
411LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
412OBJOUT_FLAG = -o
413EXEOUT_FLAG = -o
414LIBOUT_FLAG =
415
416# NOTE: we assume that GCC uses MSVCRT.DLL
417BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
418
419.ELSE
420
421CC = cl
422LINK32 = link
423LIB32 = $(LINK32) -lib
424RSC = rc
425
426#
427# Options
428#
429
430INCLUDES = -I$(COREDIR) -I.\include -I. -I..
431#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
432DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
433LOCDEFS = -DPERLDLL -DPERL_CORE
434SUBSYS = console
435CXX_FLAG = -TP -GX
436
437.IF "$(USE_PERLCRT)" != "define"
438LIBC = msvcrt.lib
439.ELSE
440LIBC = PerlCRT.lib
441.ENDIF
442
443PERLEXE_RES =
444PERLDLL_RES =
445
446.IF "$(CFG)" == "Debug"
447.IF "$(CCTYPE)" == "MSVC20"
448OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
449LINK_DBG = -debug -pdb:none
450.ELSE
451# -Zi requires .pdb file(s)
452#OPTIMIZE = -Od -MD -Zi -DDEBUGGING
453#LINK_DBG = -debug
454OPTIMIZE = -O1 -MD -Z7 -DDEBUGGING
455LINK_DBG = -debug -debugtype:both -pdb:none
456.ENDIF
457.ELSE
458.IF "$(CFG)" == "Optimize"
459# -O1 yields smaller code, which turns out to be faster than -O2
460#OPTIMIZE = -O2 -MD -DNDEBUG
461OPTIMIZE = -O1 -MD -DNDEBUG
462.ELSE
463OPTIMIZE = -Od -MD -DNDEBUG
464.ENDIF
465LINK_DBG = -release
466.ENDIF
467
468LIBBASEFILES = $(CRYPT_LIB) \
469 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
470 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
471 netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
472 version.lib odbc32.lib odbccp32.lib
473
474# we add LIBC here, since we may be using PerlCRT.dll
475LIBFILES = $(LIBBASEFILES) $(LIBC)
476
477CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
478 $(PCHFLAGS) $(OPTIMIZE)
479LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
480 -libpath:"$(INST_COREDIR)" \
481 -machine:$(PROCESSOR_ARCHITECTURE)
482OBJOUT_FLAG = -Fo
483EXEOUT_FLAG = -Fe
484LIBOUT_FLAG = /out:
485
486.IF "$(USE_PERLCRT)" != "define"
487BUILDOPT += -DPERL_MSVCRT_READFIX
488.ENDIF
489
490.ENDIF
491
1e71036e
JH
492CFLAGS_O = $(CFLAGS) $(BUILDOPT)
493
494# used to allow local linking flags that are not propogated into Config.pm,
495# currently unused
496# -- BKS, 12-12-1999
497PRIV_LINK_FLAGS *=
498BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
499
500#################### do not edit below this line #######################
501############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
502
503o *= .obj
504a *= .lib
505
506LKPRE = INPUT (
507LKPOST = )
508
509#
510# Rules
511#
512
513.SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
514
515.c$(o):
516 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
517
518.c.i:
519 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
520
521.y.c:
522 $(NOOP)
523
524$(o).dll:
525.IF "$(CCTYPE)" == "BORLAND"
526 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
527 $(IMPLIB) $(*B).lib $@
528.ELIF "$(CCTYPE)" == "GCC"
529 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
530 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
531.ELSE
532 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
533 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
534.ENDIF
535
536.rc.res:
537 $(RSC) -i.. $<
538
539#
540# various targets
541MINIPERL = ..\miniperl.exe
542MINIDIR = .\mini
543PERLEXE = ..\perl.exe
544WPERLEXE = ..\wperl.exe
545GLOBEXE = ..\perlglob.exe
546CONFIGPM = ..\lib\Config.pm
547MINIMOD = ..\lib\ExtUtils\Miniperl.pm
548X2P = ..\x2p\a2p.exe
549
550# Nominate a target which causes extensions to be re-built
551# This used to be $(PERLEXE), but at worst it is the .dll that they depend
552# on and really only the interface - i.e. the .def file used to export symbols
553# from the .dll
554PERLDEP = perldll.def
555
556
557PL2BAT = bin\pl2bat.pl
558GLOBBAT = bin\perlglob.bat
559
560UTILS = \
561 ..\utils\h2ph \
562 ..\utils\splain \
563 ..\utils\dprofpp \
564 ..\utils\perlbug \
565 ..\utils\pl2pm \
566 ..\utils\c2ph \
567 ..\utils\h2xs \
568 ..\utils\perldoc \
569 ..\utils\perlcc \
570 ..\utils\perlivp \
571 ..\utils\libnetcfg \
572 ..\pod\checkpods \
573 ..\pod\pod2html \
574 ..\pod\pod2latex \
575 ..\pod\pod2man \
576 ..\pod\pod2text \
577 ..\pod\pod2usage \
578 ..\pod\podchecker \
579 ..\pod\podselect \
580 ..\x2p\find2perl \
581 ..\x2p\s2p \
582 ..\lib\ExtUtils\xsubpp \
583 bin\exetype.pl \
584 bin\runperl.pl \
585 bin\pl2bat.pl \
586 bin\perlglob.pl \
587 bin\search.pl
588
589.IF "$(CCTYPE)" == "BORLAND"
590
591CFGSH_TMPL = config.bc
592CFGH_TMPL = config_H.bc
593
594.ELIF "$(CCTYPE)" == "GCC"
595
596CFGSH_TMPL = config.gc
597CFGH_TMPL = config_H.gc
598PERLIMPLIB = ..\libperl57$(a)
599
600.ELSE
601
602CFGSH_TMPL = config.vc
603CFGH_TMPL = config_H.vc
604
605.ENDIF
606
607# makedef.pl must be updated if this changes, and this should normally
608# only change when there is an incompatible revision of the public API.
609# XXX so why did we change it from perl56 to perl57?
610PERLIMPLIB *= ..\perl57$(a)
611PERLDLL = ..\perl57.dll
612
613XCOPY = xcopy /f /r /i /d
614RCOPY = xcopy /f /r /i /e /d
615NOOP = @echo
616
617#
618# filenames given to xsubpp must have forward slashes (since it puts
619# full pathnames in #line strings)
620XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
621 -C++ -prototypes
622
623MICROCORE_SRC = \
624 ..\av.c \
625 ..\deb.c \
626 ..\doio.c \
627 ..\doop.c \
628 ..\dump.c \
629 ..\globals.c \
630 ..\gv.c \
631 ..\hv.c \
632 ..\locale.c \
633 ..\mg.c \
634 ..\numeric.c \
635 ..\op.c \
636 ..\perl.c \
637 ..\perlapi.c \
638 ..\perly.c \
639 ..\pp.c \
640 ..\pp_ctl.c \
641 ..\pp_hot.c \
642 ..\pp_pack.c \
643 ..\pp_sys.c \
644 ..\regcomp.c \
645 ..\regexec.c \
646 ..\run.c \
647 ..\scope.c \
648 ..\sv.c \
8a12a0aa 649 ..\sharedsv.c \
1e71036e
JH
650 ..\taint.c \
651 ..\toke.c \
652 ..\universal.c \
653 ..\utf8.c \
654 ..\util.c \
655 ..\xsutils.c
656
657EXTRACORE_SRC += perllib.c
658
659.IF "$(PERL_MALLOC)" == "define"
660EXTRACORE_SRC += ..\malloc.c
661.ENDIF
662
1e71036e 663EXTRACORE_SRC += ..\perlio.c
1e71036e
JH
664
665WIN32_SRC = \
666 .\win32.c \
1e71036e
JH
667 .\win32sck.c \
668 .\win32thread.c
669
6ea0e807
MB
670.IF "$(USE_PERLIO)" == "define"
671WIN32_SRC += .\win32io.c
672.ENDIF
673
1e71036e
JH
674.IF "$(CRYPT_SRC)" != ""
675WIN32_SRC += .\$(CRYPT_SRC)
676.ENDIF
677
678DLL_SRC = $(DYNALOADER).c
679
680X2P_SRC = \
681 ..\x2p\a2p.c \
682 ..\x2p\hash.c \
683 ..\x2p\str.c \
684 ..\x2p\util.c \
685 ..\x2p\walk.c
686
687CORE_NOCFG_H = \
688 ..\av.h \
689 ..\cop.h \
690 ..\cv.h \
691 ..\dosish.h \
692 ..\embed.h \
693 ..\form.h \
694 ..\gv.h \
695 ..\handy.h \
696 ..\hv.h \
697 ..\iperlsys.h \
698 ..\mg.h \
699 ..\nostdio.h \
700 ..\op.h \
701 ..\opcode.h \
702 ..\perl.h \
703 ..\perlapi.h \
704 ..\perlsdio.h \
705 ..\perlsfio.h \
706 ..\perly.h \
707 ..\pp.h \
708 ..\proto.h \
709 ..\regexp.h \
710 ..\scope.h \
8a12a0aa 711 ..\sharedsv.h \
1e71036e
JH
712 ..\sv.h \
713 ..\thread.h \
714 ..\unixish.h \
715 ..\utf8.h \
716 ..\util.h \
717 ..\warnings.h \
718 ..\XSUB.h \
719 ..\EXTERN.h \
720 ..\perlvars.h \
721 ..\intrpvar.h \
722 ..\thrdvar.h \
723 .\include\dirent.h \
724 .\include\netdb.h \
725 .\include\sys\socket.h \
726 .\win32.h
727
728CORE_H = $(CORE_NOCFG_H) .\config.h
729
730MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
731CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
732WIN32_OBJ = $(WIN32_SRC:db:+$(o))
733MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
6148bcae 734MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
1e71036e
JH
735MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
736DLL_OBJ = $(DLL_SRC:db:+$(o))
737X2P_OBJ = $(X2P_SRC:db:+$(o))
738
739PERLDLL_OBJ = $(CORE_OBJ)
740PERLEXE_OBJ = perlmain$(o)
741
742PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
743
744.IF "$(USE_SETARGV)" != ""
745SETARGV_OBJ = setargv$(o)
746.ENDIF
747
748DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
749 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
750 Sys/Hostname Storable Filter/Util/Call Encode \
ac5ea531
JH
751 Digest/MD5 PerlIO/Scalar MIME/Base64 Time/HiRes \
752 Unicode/Normalize
1e71036e
JH
753STATIC_EXT = DynaLoader
754NONXS_EXT = Errno
755
756DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
757
758POD2HTML = $(PODDIR)\pod2html
759POD2MAN = $(PODDIR)\pod2man
760POD2LATEX = $(PODDIR)\pod2latex
761POD2TEXT = $(PODDIR)\pod2text
762
763# vars must be separated by "\t+~\t+", since we're using the tempfile
764# version of config_sh.pl (we were overflowing someone's buffer by
765# trying to fit them all on the command line)
766# -- BKS 10-17-1999
767CFG_VARS = \
768 INST_DRV=$(INST_DRV) ~ \
769 INST_TOP=$(INST_TOP:s/\/\\/) ~ \
770 INST_VER=$(INST_VER:s/\/\\/) ~ \
771 INST_ARCH=$(INST_ARCH) ~ \
772 archname=$(ARCHNAME) ~ \
773 cc=$(CC) ~ \
774 ld=$(LINK32) ~ \
775 ccflags=$(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
776 cf_email=$(EMAIL) ~ \
777 d_crypt=$(D_CRYPT) ~ \
778 d_mymalloc=$(PERL_MALLOC) ~ \
779 libs=$(LIBFILES:f) ~ \
780 incpath=$(CCINCDIR:s/\/\\/) ~ \
781 libperl=$(PERLIMPLIB:f) ~ \
782 libpth=$(CCLIBDIR:s/\/\\/);$(EXTRALIBDIRS:s/\/\\/) ~ \
783 libc=$(LIBC) ~ \
784 make=dmake ~ \
785 _o=$(o) obj_ext=$(o) ~ \
786 _a=$(a) lib_ext=$(a) ~ \
787 static_ext=$(STATIC_EXT) ~ \
788 use5005threads=$(USE_5005THREADS) ~ \
789 useithreads=$(USE_ITHREADS) ~ \
790 usethreads=$(USE_5005THREADS) ~ \
791 usemultiplicity=$(USE_MULTI) ~ \
792 useperlio=$(USE_PERLIO) ~ \
793 LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \
794 optimize=$(OPTIMIZE)
795
796#
797# set up targets varying between Win95 and WinNT builds
798#
799
800.IF "$(IS_WIN95)" == "define"
801MK2 = .\makefile.95
802RIGHTMAKE = __switch_makefiles
803NOOP = @rem
804.ELSE
805MK2 = __not_needed
806RIGHTMAKE =
807.ENDIF
808
809#
810# Top targets
811#
812
813all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
814 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
815 $(X2P) Extensions
816
817$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
818
819#----------------------------------------------------------------
820
821#-------------------- BEGIN Win95 SPECIFIC ----------------------
822
823# this target is a jump-off point for Win95
824# 1. it switches to the Win95-specific makefile if it exists
825# (__do_switch_makefiles)
826# 2. it prints a message when the Win95-specific one finishes (__done)
827# 3. it then kills this makefile by trying to make __no_such_target
828
829__switch_makefiles: __do_switch_makefiles __done __no_such_target
830
831__do_switch_makefiles:
832.IF "$(NOTFIRST)" != "true"
833 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
834.ELSE
835 $(NOOP)
836.ENDIF
837
838.IF "$(NOTFIRST)" != "true"
839__done:
840 @echo Build process complete. Ignore any errors after this message.
841 @echo Run "dmake test" to test and "dmake install" to install
842
843.ELSE
844# dummy targets for Win95-specific makefile
845
846__done:
847 $(NOOP)
848
849__no_such_target:
850 $(NOOP)
851
852.ENDIF
853
854# This target is used to generate the new makefile (.\makefile.95) for Win95
855
856.\makefile.95: .\makefile.mk
857 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
858
859#--------------------- END Win95 SPECIFIC ---------------------
860
861# a blank target for when builds don't need to do certain things
862# this target added for Win95 port but used to keep the WinNT port able to
863# use this file
864__not_needed:
865 $(NOOP)
866
867$(GLOBEXE) : perlglob$(o)
868.IF "$(CCTYPE)" == "BORLAND"
869 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
870 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
871 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
872.ELIF "$(CCTYPE)" == "GCC"
873 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
874.ELSE
875 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
876 perlglob$(o) setargv$(o)
877.ENDIF
878
879perlglob$(o) : perlglob.c
880
881config.w32 : $(CFGSH_TMPL)
882 copy $(CFGSH_TMPL) config.w32
883
884.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
885 -del /f config.h
886 copy $(CFGH_TMPL) config.h
887
888..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
889 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
890 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
891
892# this target is for when changes to the main config.sh happen
893# edit config.{b,v,g}c and make this target once for each supported
894# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
895regen_config_h:
896 perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
897 $(CFGSH_TMPL) > ..\config.sh
898 -cd .. && del /f perl.exe
899 cd .. && perl configpm
900 -del /f $(CFGH_TMPL)
901 -mkdir $(COREDIR)
902 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
903 rename config.h $(CFGH_TMPL)
904
905$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
906 cd .. && miniperl configpm
907 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
908 $(XCOPY) ..\*.h $(COREDIR)\*.*
909 $(XCOPY) *.h $(COREDIR)\*.*
910 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
911 $(RCOPY) include $(COREDIR)\*.*
912 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
913 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
914
915$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
916.IF "$(CCTYPE)" == "BORLAND"
917 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
918 @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
919.ELIF "$(CCTYPE)" == "GCC"
920 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
921 $(mktmp $(LKPRE) $(MINI_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
922.ELSE
923 $(LINK32) -subsystem:console -out:$@ \
924 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,\\))
925.ENDIF
926
927$(MINIDIR) :
928 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
929
930$(MINICORE_OBJ) : $(CORE_NOCFG_H)
931 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c
932
933$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
934 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
935
936# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
937# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
938# unless the .IF is true), so instead we use a .ELSE with the default.
939# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
940
941perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
acfe0abc 942.IF "$(USE_IMP_SYS)" == "define"
1e71036e
JH
943 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
944.ELSE
945 $(CC) -c -I. $(CFLAGS_O) $(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
958 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
959 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
960
961$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
962.IF "$(CCTYPE)" == "BORLAND"
963 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
964 @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,\\)\n \
965 $@,\n \
966 $(LIBFILES)\n \
967 perldll.def\n)
968 $(IMPLIB) $*.lib $@
969.ELIF "$(CCTYPE)" == "GCC"
970 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
971 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
972 dlltool --output-lib $(PERLIMPLIB) \
973 --dllname $(PERLDLL:b).dll \
974 --def perldll.def \
975 --base-file perl.base \
976 --output-exp perl.exp
977 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
978 $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) \
979 perl.exp $(LKPOST))
980.ELSE
981 $(LINK32) -dll -def:perldll.def -out:$@ \
982 @$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
983 $(PERLDLL_RES) $(PERLDLL_OBJ:s,\,\\))
984.ENDIF
985 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
986
987$(MINIMOD) : $(MINIPERL) ..\minimod.pl
988 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
989
990..\x2p\a2p$(o) : ..\x2p\a2p.c
991 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
992
993..\x2p\hash$(o) : ..\x2p\hash.c
994 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
995
996..\x2p\str$(o) : ..\x2p\str.c
997 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
998
999..\x2p\util$(o) : ..\x2p\util.c
1000 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1001
1002..\x2p\walk$(o) : ..\x2p\walk.c
1003 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1004
1005$(X2P) : $(MINIPERL) $(X2P_OBJ)
1006 $(MINIPERL) ..\x2p\find2perl.PL
1007 $(MINIPERL) ..\x2p\s2p.PL
1008.IF "$(CCTYPE)" == "BORLAND"
1009 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1010 @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
1011.ELIF "$(CCTYPE)" == "GCC"
1012 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1013 $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
1014.ELSE
1015 $(LINK32) -subsystem:console -out:$@ \
1016 @$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\))
1017.ENDIF
1018
1019perlmain.c : runperl.c
1020 copy runperl.c perlmain.c
1021
1022perlmain$(o) : perlmain.c
1023 $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
1024
1025$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1026.IF "$(CCTYPE)" == "BORLAND"
1027 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1028 @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
1029 $(@:s,\,\\),\n \
1030 $(PERLIMPLIB) $(LIBFILES)\n)
1031.ELIF "$(CCTYPE)" == "GCC"
1032 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1033 $(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
1034.ELSE
1035 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1036 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1037.ENDIF
1038 copy $(PERLEXE) $(WPERLEXE)
1039 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1040 copy splittree.pl ..
1041 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1042
1043$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
1044 if not exist $(AUTODIR) mkdir $(AUTODIR)
1045 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1046 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1047 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1048 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1049 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
1050 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
1051
1052$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
1053 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
1054
1055#----------------------------------------------------------------------------------
1056Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
1057 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
1058
1059Extensions_clean :
1060 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
1061
1062#----------------------------------------------------------------------------------
1063
1064
1065doc: $(PERLEXE)
1066 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
1067 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1068 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1069
1070utils: $(PERLEXE) $(X2P)
1071 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1072 copy ..\README.aix ..\pod\perlaix.pod
1073 copy ..\README.amiga ..\pod\perlamiga.pod
1074 copy ..\README.apollo ..\pod\perlapollo.pod
1075 copy ..\README.beos ..\pod\perlbeos.pod
1076 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1077 copy ..\README.ce ..\pod\perlce.pod
1078 copy ..\README.cygwin ..\pod\perlcygwin.pod
1079 copy ..\README.dgux ..\pod\perldgux.pod
1080 copy ..\README.dos ..\pod\perldos.pod
1081 copy ..\README.epoc ..\pod\perlepoc.pod
1082 copy ..\README.hpux ..\pod\perlhpux.pod
1083 copy ..\README.hurd ..\pod\perlhurd.pod
1084 copy ..\README.machten ..\pod\perlmachten.pod
1085 copy ..\README.macos ..\pod\perlmacos.pod
1086 copy ..\README.mint ..\pod\perlmint.pod
1087 copy ..\README.mpeix ..\pod\perlmpeix.pod
1088 copy ..\README.netware ..\pod\perlnetware.pod
1089 copy ..\README.os2 ..\pod\perlos2.pod
1090 copy ..\README.os390 ..\pod\perlos390.pod
1091 copy ..\README.plan9 ..\pod\perlplan9.pod
1092 copy ..\README.qnx ..\pod\perlqnx.pod
1093 copy ..\README.solaris ..\pod\perlsolaris.pod
1094 copy ..\README.tru64 ..\pod\perltru64.pod
1095 copy ..\README.uts ..\pod\perluts.pod
1096 copy ..\README.vmesa ..\pod\perlvmesa.pod
1097 copy ..\vms\perlvms.pod ..\pod\perlvms.pod
1098 copy ..\README.vos ..\pod\perlvos.pod
1099 copy ..\README.win32 ..\pod\perlwin32.pod
1100 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1101 cd ..\lib && $(PERLEXE) lib_pm.PL
1102 $(PERLEXE) $(PL2BAT) $(UTILS)
1103
1104distclean: clean
1105 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1106 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
1107 -del /f *.def *.map
1108 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1109 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1110 -del /f $(LIBDIR)\XSLoader.pm
1111 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1112 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1113 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1114 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1115 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1116 -del /f $(LIBDIR)\PerlIO\Scalar.pm
1117 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1118 -del /f $(LIBDIR)\File\Glob.pm
1119 -del /f $(LIBDIR)\Storable.pm
1120 -del /f $(LIBDIR)\Filter\Util\Call.pm
1121 -del /f $(LIBDIR)\Digest\MD5.pm
1122 -del /f $(LIBDIR)\MIME\Base64.pm
1123 -del /f $(LIBDIR)\MIME\QuotedPrint.pm
1124 -del /f $(LIBDIR)\Time\HiRes.pm
1125 -del /f $(LIBDIR)\List\Util.pm
1126 -del /f $(LIBDIR)\Scalar\Util.pm
ac5ea531 1127 -del /f $(LIBDIR)\Unicode\Normalize.pm
1e71036e
JH
1128 -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1129 -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1130 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1131 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1132 -if exist $(LIBDIR)\Filter\Util\Call rmdir /s /q $(LIBDIR)\Filter\Util\Call || rmdir /s $(LIBDIR)\Filter
1133 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util || rmdir /s $(LIBDIR)\Filter
1134 -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest || rmdir /s $(LIBDIR)\Digest
1135 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME || rmdir /s $(LIBDIR)\MIME
1136 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List || rmdir /s $(LIBDIR)\List
1137 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar || rmdir /s $(LIBDIR)\Scalar
1138 -cd $(PODDIR) && del /f *.html *.bat checkpods \
1139 perlaix.pod perlamiga.pod perlapollo.pod \
1140 perlbeos.pod perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
1141 perldos.pod perlepoc.pod perlhpux.pod perlhurd.pod \
1142 perlmachten.pod perlmint.pod \
1143 perlmacos.pod perlmpeix.pod perlnetware.pod \
1144 perlos2.pod perlos390.pod \
1145 perlplan9.pod perlqnx.pod \
1146 perlsolaris.pod perltru64.pod perluts.pod \
1147 perlvmesa.pod perlvms.pod perlvos.pod \
1148 perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
1149 podchecker podselect
1150 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
1151 perlivp dprofpp *.bat
1152 -cd ..\x2p && del /f find2perl s2p *.bat
1153 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
1154 -del /f $(CONFIGPM)
1155 -del /f bin\*.bat
1156 -cd $(EXTDIR) && del /s *$(a) *.def *.map *.pdb *.bs Makefile *$(o) \
1157 pm_to_blib
1158 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1159 -if exist $(COREDIR) rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1160
1161install : all installbare installhtml
1162
1163installbare : $(RIGHTMAKE) utils
1164 $(PERLEXE) ..\installperl
1165 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1166 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1167 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1168
1169installhtml : doc
1170 $(RCOPY) html\*.* $(INST_HTML)\*.*
1171
1172inst_lib : $(CONFIGPM)
1173 copy splittree.pl ..
1174 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1175 $(RCOPY) ..\lib $(INST_LIB)\*.*
1176
1177minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
1178 $(XCOPY) $(MINIPERL) ..\t\perl.exe
1179.IF "$(CCTYPE)" == "BORLAND"
1180 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1181.ELSE
1182 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1183.ENDIF
1184 attrib -r ..\t\*.*
1185 copy test ..\t
1186 cd ..\t && \
1187 $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1188
1189test-prep : all utils
1190 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1191 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1192.IF "$(CCTYPE)" == "BORLAND"
1193 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1194.ELSE
1195 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1196.ENDIF
1197
1198test : $(RIGHTMAKE) test-prep
1199 cd ..\t && $(PERLEXE) -I..\lib harness
1200
1201test-notty : test-prep
1202 set PERL_SKIP_TTY_TEST=1 && \
1203 cd ..\t && $(PERLEXE) -I.\lib harness
1204
1205test-wide : test-prep
1206 set HARNESS_PERL_SWITCHES=-C && \
1207 cd ..\t && $(PERLEXE) -I..\lib harness
1208
1209test-wide-notty : test-prep
1210 set PERL_SKIP_TTY_TEST=1 && \
1211 set HARNESS_PERL_SWITCHES=-C && \
1212 cd ..\t && $(PERLEXE) -I..\lib harness
1213
1214clean : Extensions_clean
1215 -@erase miniperlmain$(o)
1216 -@erase $(MINIPERL)
1217 -@erase perlglob$(o)
1218 -@erase perlmain$(o)
1219 -@erase config.w32
1220 -@erase /f config.h
1221 -@erase $(GLOBEXE)
1222 -@erase $(PERLEXE)
1223 -@erase $(WPERLEXE)
1224 -@erase $(PERLDLL)
1225 -@erase $(CORE_OBJ)
1226 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
1227 -@erase $(WIN32_OBJ)
1228 -@erase $(DLL_OBJ)
1229 -@erase $(X2P_OBJ)
1230 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1231 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1232 -@erase ..\x2p\*.exe ..\x2p\*.bat
1233 -@erase *.ilk
1234 -@erase *.pdb
1235
1236# Handy way to run perlbug -ok without having to install and run the
1237# installed perlbug. We don't re-run the tests here - we trust the user.
1238# Please *don't* use this unless all tests pass.
1239# If you want to report test failures, use "dmake nok" instead.
1240ok: utils
1241 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1242
1243okfile: utils
1244 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1245
1246nok: utils
1247 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1248
1249nokfile: utils
1250 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok