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