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