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