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