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