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