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