This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge the opcode bodies for chop/chomp and schop/schomp.
[perl5.git] / win32 / Makefile
1 #
2 # Makefile to build perl on Windows using Microsoft NMAKE.
3 # Supported compilers:
4 #       Microsoft Visual C++ 6.0 or later
5 #       Windows SDK 64-bit compiler and tools
6 #
7 # This is set up to build a perl.exe that runs off a shared library
8 # (perl513.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 # Uncomment if you want to build a 32-bit Perl using a 32-bit compiler
28 # on a 64-bit version of Windows.
29 #WIN64          = undef
30
31 #
32 # Comment this out if you DON'T want your perl installation to be versioned.
33 # This means that the new installation will overwrite any files from the
34 # old installation at the same INST_TOP location.  Leaving it enabled is
35 # the safest route, as perl adds the extra version directory to all the
36 # locations it installs files to.  If you disable it, an alternative
37 # versioned installation can be obtained by setting INST_TOP above to a
38 # path that includes an arbitrary version string.
39 #
40 #INST_VER       = \5.13.8
41
42 #
43 # Comment this out if you DON'T want your perl installation to have
44 # architecture specific components.  This means that architecture-
45 # specific files will be installed along with the architecture-neutral
46 # files.  Leaving it enabled is safer and more flexible, in case you
47 # want to build multiple flavors of perl and install them together in
48 # the same location.  Commenting it out gives you a simpler
49 # installation that is easier to understand for beginners.
50 #
51 #INST_ARCH      = \$(ARCHNAME)
52
53 #
54 # Uncomment this if you want perl to run
55 #       $Config{sitelibexp}\sitecustomize.pl
56 # before anything else.  This script can then be set up, for example,
57 # to add additional entries to @INC.
58 #
59 #USE_SITECUST   = define
60
61 #
62 # uncomment to enable multiple interpreters.  This is need for fork()
63 # emulation and for thread support.
64 #
65 USE_MULTI       = define
66
67 #
68 # Beginnings of interpreter cloning/threads; now reasonably complete.
69 # This should be enabled to get the fork() emulation.  This needs
70 # USE_MULTI as well.
71 #
72 USE_ITHREADS    = define
73
74 #
75 # uncomment to enable the implicit "host" layer for all system calls
76 # made by perl.  This needs USE_MULTI above.  This is also needed to
77 # get fork().
78 #
79 USE_IMP_SYS     = define
80
81 #
82 # Comment out next assign to disable perl's I/O subsystem and use compiler's 
83 # stdio for IO - depending on your compiler vendor and run time library you may 
84 # then get a number of fails from make test i.e. bugs - complain to them not us ;-). 
85 # You will also be unable to take full advantage of perl5.8's support for multiple 
86 # encodings and may see lower IO performance. You have been warned.
87 USE_PERLIO      = define
88
89 #
90 # Comment this out if you don't want to enable large file support for
91 # some reason.  Should normally only be changed to maintain compatibility
92 # with an older release of perl.
93 USE_LARGE_FILES = define
94
95 #
96 # uncomment exactly one of the following
97 #
98 # Visual C++ 6.x (aka Visual C++ 98)
99 CCTYPE          = MSVC60
100 # Visual C++ Toolkit 2003 (aka Visual C++ 7.x) (free command-line tools)
101 #CCTYPE         = MSVC70FREE
102 # Visual C++ .NET 2003 (aka Visual C++ 7.x) (full version)
103 #CCTYPE         = MSVC70
104 # Windows Server 2003 SP1 Platform SDK (April 2005)
105 #CCTYPE         = SDK2003SP1
106 # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
107 #CCTYPE         = MSVC80FREE
108 # Visual C++ 2005 (aka Visual C++ 8.x) (full version)
109 #CCTYPE         = MSVC80
110 # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
111 #CCTYPE         = MSVC90FREE
112 # Visual C++ 2008 (aka Visual C++ 9.x) (full version)
113 #CCTYPE         = MSVC90
114 # Visual C++ 2010 Express Edition (aka Visual C++ 10.x) (free version)
115 #CCTYPE         = MSVC100FREE
116 # Visual C++ 2010 (aka Visual C++ 10.x) (full version)
117 #CCTYPE         = MSVC100
118
119 #
120 # uncomment next line if you want debug version of perl (big,slow)
121 # If not enabled, we automatically try to use maximum optimization
122 # with all compilers that are known to have a working optimizer.
123 #
124 #CFG            = Debug
125
126 #
127 # uncomment to enable linking with setargv.obj under the Visual C
128 # compiler. Setting this options enables perl to expand wildcards in
129 # arguments, but it may be harder to use alternate methods like
130 # File::DosGlob that are more powerful.  This option is supported only with
131 # Visual C.
132 #
133 #USE_SETARGV    = define
134
135 #
136 # set this if you wish to use perl's malloc
137 # WARNING: Turning this on/off WILL break binary compatibility with extensions
138 # you may have compiled with/without it.  Be prepared to recompile all
139 # extensions if you change the default.  Currently, this cannot be enabled
140 # if you ask for USE_IMP_SYS above.
141 #
142 #PERL_MALLOC    = define
143
144 #
145 # set this to enable debugging mstats
146 # This must be enabled to use the Devel::Peek::mstat() function.  This cannot
147 # be enabled without PERL_MALLOC as well.
148 #
149 #DEBUG_MSTATS   = define
150
151 #
152 # set this to additionally provide a statically linked perl-static.exe.
153 # Note that dynamic loading will not work with this perl, so you must
154 # include required modules statically using the STATIC_EXT or ALL_STATIC
155 # variables below. A static library perl513s.lib will also be created.
156 # Ordinary perl.exe is not affected by this option.
157 #
158 #BUILD_STATIC   = define
159
160 #
161 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
162 # extension get statically built
163 # This will result in a very large perl executable, but the main purpose
164 # is to have proper linking set so as to be able to create miscellaneous
165 # executables with different built-in extensions
166 #
167 #ALL_STATIC     = define
168
169 #
170 #
171 # set the install locations of the compiler include/libraries
172 # Running VCVARS32.BAT is *required* when using Visual C.
173 # Some versions of Visual C don't define MSVCDIR in the environment,
174 # so you may have to set CCHOME explicitly (spaces in the path name should
175 # not be quoted)
176 #
177 CCHOME          = $(MSVCDIR)
178 CCINCDIR        = $(CCHOME)\include
179 CCLIBDIR        = $(CCHOME)\lib
180
181 #
182 # Additional compiler flags can be specified here.
183 #
184 BUILDOPT        = $(BUILDOPTEXTRA)
185
186 #
187 # This should normally be disabled.  Enabling it will disable the File::Glob
188 # implementation of CORE::glob.
189 #
190 #BUILDOPT       = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
191
192 #
193 # This should normally be disabled.  Enabling it causes perl to read scripts
194 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
195 #
196 #BUILDOPT       = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
197
198 #
199 # specify semicolon-separated list of extra directories that modules will
200 # look for libraries (spaces in path names need not be quoted)
201 #
202 EXTRALIBDIRS    =
203
204 #
205 # set this to your email address (perl will guess a value from
206 # from your loginname and your hostname, which may not be right)
207 #
208 #EMAIL          =
209
210 ##
211 ## Build configuration ends.
212 ##
213
214 ##################### CHANGE THESE ONLY IF YOU MUST #####################
215
216 !IF "$(USE_IMP_SYS)" == "define"
217 PERL_MALLOC     = undef
218 DEBUG_MSTATS    = undef
219 !ENDIF
220
221 !IF "$(PERL_MALLOC)" == ""
222 PERL_MALLOC     = undef
223 DEBUG_MSTATS    = undef
224 !ENDIF
225
226 !IF "$(DEBUG_MSTATS)" == ""
227 DEBUG_MSTATS    = undef
228 !ENDIF
229
230 !IF "$(DEBUG_MSTATS)" == "define"
231 BUILDOPT        = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
232 !ENDIF
233
234 !IF "$(USE_SITECUST)" == ""
235 USE_SITECUST    = undef
236 !ENDIF
237
238 !IF "$(USE_MULTI)" == ""
239 USE_MULTI       = undef
240 !ENDIF
241
242 !IF "$(USE_ITHREADS)" == ""
243 USE_ITHREADS    = undef
244 !ENDIF
245
246 !IF "$(USE_IMP_SYS)" == ""
247 USE_IMP_SYS     = undef
248 !ENDIF
249
250 !IF "$(USE_PERLIO)" == ""
251 USE_PERLIO      = undef
252 !ENDIF
253
254 !IF "$(USE_LARGE_FILES)" == ""
255 USE_LARGE_FILES = undef
256 !ENDIF
257
258 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
259 USE_MULTI       = define
260 !ENDIF
261
262 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
263 USE_MULTI       = define
264 !ENDIF
265
266 !IF "$(USE_SITECUST)" == "define"
267 BUILDOPT        = $(BUILDOPT) -DUSE_SITECUSTOMIZE
268 !ENDIF
269
270 !IF "$(USE_MULTI)" != "undef"
271 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
272 !ENDIF
273
274 !IF "$(USE_IMP_SYS)" != "undef"
275 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_SYS
276 !ENDIF
277
278 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
279 PROCESSOR_ARCHITECTURE  = x86
280 !ENDIF
281
282 !IF "$(WIN64)" == ""
283 # When we are running from a 32bit cmd.exe on AMD64 then
284 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
285 # is set to AMD64
286 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
287 PROCESSOR_ARCHITECTURE  = $(PROCESSOR_ARCHITEW6432)
288 WIN64                   = define
289 !ELSE
290 !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
291 WIN64                   = define
292 !ELSE
293 WIN64                   = undef
294 !ENDIF
295 !ENDIF
296 !ENDIF
297
298 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
299 # both link against MSVCRT.dll (which is part of Windows itself) and
300 # not against a compiler specific versioned runtime.
301 !IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
302 CCTYPE          = SDK2003SP1
303 !ENDIF
304
305 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
306 !IF "$(ARCHITECTURE)" == "AMD64"
307 ARCHITECTURE    = x64
308 !ENDIF
309 !IF "$(ARCHITECTURE)" == "IA64"
310 ARCHITECTURE    = ia64
311 !ENDIF
312
313 !IF "$(USE_MULTI)" == "define"
314 ARCHNAME        = MSWin32-$(ARCHITECTURE)-multi
315 !ELSE
316 !IF "$(USE_PERLIO)" == "define"
317 ARCHNAME        = MSWin32-$(ARCHITECTURE)-perlio
318 !ELSE
319 ARCHNAME        = MSWin32-$(ARCHITECTURE)
320 !ENDIF
321 !ENDIF
322
323 !IF "$(USE_PERLIO)" == "define"
324 BUILDOPT        = $(BUILDOPT) -DUSE_PERLIO
325 !ENDIF
326
327 !IF "$(USE_ITHREADS)" == "define"
328 ARCHNAME        = $(ARCHNAME)-thread
329 !ENDIF
330
331 # Visual C++ 98, .NET 2003, 2005/2008/2010 specific.
332 # VC++ 6/7/8/9/10.x can load DLLs on demand.  Makes the test suite run
333 # in about 10% less time.  (The free version of 7.x can't do this, but the free
334 # versions of 8/9/10.x can.)
335 !IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70"     || \
336     "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
337     "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" || \
338     "$(CCTYPE)" == "MSVC100" || "$(CCTYPE)" == "MSVC100FREE"
339 DELAYLOAD       = -DELAYLOAD:ws2_32.dll delayimp.lib
340 !ENDIF
341
342 # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
343 # DLLs. These either need copying everywhere with the binaries, or else need
344 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
345 # simplicity, embed them if they exist (and delete them afterwards so that they
346 # don't get installed too).
347 EMBED_EXE_MANI  = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
348                   if exist $@.manifest del $@.manifest
349 EMBED_DLL_MANI  = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
350                   if exist $@.manifest del $@.manifest
351
352 ARCHDIR         = ..\lib\$(ARCHNAME)
353 COREDIR         = ..\lib\CORE
354 AUTODIR         = ..\lib\auto
355 LIBDIR          = ..\lib
356 EXTDIR          = ..\ext
357 DISTDIR         = ..\dist
358 CPANDIR         = ..\cpan
359 PODDIR          = ..\pod
360 EXTUTILSDIR     = $(LIBDIR)\ExtUtils
361 HTMLDIR         = .\html
362
363 #
364 INST_SCRIPT     = $(INST_TOP)$(INST_VER)\bin
365 INST_BIN        = $(INST_SCRIPT)$(INST_ARCH)
366 INST_LIB        = $(INST_TOP)$(INST_VER)\lib
367 INST_ARCHLIB    = $(INST_LIB)$(INST_ARCH)
368 INST_COREDIR    = $(INST_ARCHLIB)\CORE
369 INST_HTML       = $(INST_TOP)$(INST_VER)\html
370
371 #
372 # Programs to compile, build .lib files and link
373 #
374
375 CC              = cl
376 LINK32          = link
377 LIB32           = $(LINK32) -lib
378 RSC             = rc
379
380 #
381 # Options
382 #
383
384 INCLUDES        = -I$(COREDIR) -I.\include -I. -I..
385 #PCHFLAGS       = -Fpc:\temp\vcmoduls.pch -YX
386 DEFINES         = -DWIN32 -D_CONSOLE -DNO_STRICT
387 LOCDEFS         = -DPERLDLL -DPERL_CORE
388 SUBSYS          = console
389 CXX_FLAG        = -TP -EHsc
390
391 LIBC    = msvcrt.lib
392
393 !IF  "$(CFG)" == "Debug"
394 OPTIMIZE        = -Od -MD -Zi -DDEBUGGING
395 LINK_DBG        = -debug
396 !ELSE
397 OPTIMIZE        = -MD -Zi -DNDEBUG
398 # we enable debug symbols in release builds also
399 LINK_DBG        = -debug -opt:ref,icf
400 # you may want to enable this if you want COFF symbols in the executables
401 # in addition to the PDB symbols.  The default Dr. Watson that ships with
402 # Windows can use the the former but not latter.  The free WinDbg can be
403 # installed to get better stack traces from just the PDB symbols, so we
404 # avoid the bloat of COFF symbols by default.
405 #LINK_DBG       = $(LINK_DBG) -debugtype:both
406 !  IF "$(WIN64)" == "define"
407 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
408 OPTIMIZE        = $(OPTIMIZE) -Ox -GL
409 LINK_DBG        = $(LINK_DBG) -ltcg
410 !  ELSE
411 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
412 OPTIMIZE        = $(OPTIMIZE) -O1
413 #OPTIMIZE       = $(OPTIMIZE) -O2
414 !  ENDIF
415 !ENDIF
416
417 !IF "$(WIN64)" == "define"
418 DEFINES         = $(DEFINES) -DWIN64 -DCONSERVATIVE
419 OPTIMIZE        = $(OPTIMIZE) -fp:precise
420 !ENDIF
421
422 # For now, silence VC++ 8/9/10.x's warnings about "unsafe" CRT functions
423 # and POSIX CRT function names being deprecated.
424 !IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
425     "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" || \
426     "$(CCTYPE)" == "MSVC100" || "$(CCTYPE)" == "MSVC100FREE"
427 DEFINES         = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
428 !ENDIF
429
430 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
431 # 64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
432 # preprocessor option to revert back to the old functionality for
433 # backward compatibility.  We define this symbol here for older 32-bit
434 # compilers only (which aren't using it at all) for the sole purpose
435 # of getting it into $Config{ccflags}.  That way if someone builds
436 # Perl itself with e.g. VC6 but later installs an XS module using VC8
437 # the time_t types will still be compatible.
438 !IF "$(WIN64)" == "undef"
439 !  IF "$(CCTYPE)" == "MSVC60" || \
440       "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
441 BUILDOPT        = $(BUILDOPT) -D_USE_32BIT_TIME_T
442 !  ENDIF
443 !ENDIF
444
445 LIBBASEFILES    = \
446                 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
447                 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
448                 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
449                 version.lib odbc32.lib odbccp32.lib comctl32.lib
450
451 # The 64 bit Windows Server 2003 SP1 SDK compilers link against MSVCRT.dll, which
452 # doesn't include the buffer overrun verification code used by the /GS switch.
453 # Since the code links against libraries that are compiled with /GS, this
454 # "security cookie verification" code must be included via bufferoverflow.lib.
455 !IF "$(WIN64)" == "define" && "$(CCTYPE)" == "SDK2003SP1"
456 LIBBASEFILES    = $(LIBBASEFILES) bufferoverflowU.lib
457 !ENDIF
458
459 LIBFILES        = $(LIBBASEFILES) $(LIBC)
460
461 #EXTRACFLAGS    = -nologo -GF -W4 -wd4127 -wd4706
462 EXTRACFLAGS     = -nologo -GF -W3
463 CFLAGS          = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
464                 $(PCHFLAGS) $(OPTIMIZE)
465 LINK_FLAGS      = -nologo -nodefaultlib $(LINK_DBG) \
466                 -libpath:"$(INST_COREDIR)" \
467                 -machine:$(PROCESSOR_ARCHITECTURE)
468 LIB_FLAGS       = -nologo
469 OBJOUT_FLAG     = -Fo
470 EXEOUT_FLAG     = -Fe
471
472 CFLAGS_O        = $(CFLAGS) $(BUILDOPT)
473
474 !IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
475     "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE" || \
476     "$(CCTYPE)" == "MSVC100" || "$(CCTYPE)" == "MSVC100FREE"
477 LINK_FLAGS      = $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
478 !ELSE
479 RSC_FLAGS       = -DINCLUDE_MANIFEST
480 !ENDIF
481
482
483 #################### do not edit below this line #######################
484 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
485
486 o = .obj
487
488 #
489 # Rules
490 #
491
492 .SUFFIXES : .c $(o) .dll .lib .exe .rc .res
493
494 .c$(o):
495         $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
496
497 .y.c:
498         $(NOOP)
499
500 $(o).dll:
501         $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
502             -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
503         $(EMBED_DLL_MANI)
504
505 .rc.res:
506         $(RSC) -i.. $(RSC_FLAGS) $<
507
508 #
509 # various targets
510
511 # makedef.pl must be updated if this changes, and this should normally
512 # only change when there is an incompatible revision of the public API.
513 PERLIMPLIB      = ..\perl513.lib
514 PERLSTATICLIB   = ..\perl513s.lib
515 PERLDLL         = ..\perl513.dll
516
517 MINIPERL        = ..\miniperl.exe
518 MINIDIR         = .\mini
519 PERLEXE         = ..\perl.exe
520 WPERLEXE        = ..\wperl.exe
521 PERLEXESTATIC   = ..\perl-static.exe
522 GLOBEXE         = ..\perlglob.exe
523 CONFIGPM        = ..\lib\Config.pm ..\lib\Config_heavy.pl
524 MINIMOD         = ..\lib\ExtUtils\Miniperl.pm
525 X2P             = ..\x2p\a2p.exe
526 GENUUDMAP       = ..\generate_uudmap.exe
527 !IF "$(BUILD_STATIC)" == "define"
528 PERLSTATIC      = static
529 !ELSE
530 PERLSTATIC      = 
531 !ENDIF
532   
533 # Unicode data files generated by mktables
534 FIRSTUNIFILE     = ..\lib\unicore\Decomposition.pl
535 UNIDATAFILES     = ..\lib\unicore\Decomposition.pl \
536                    ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
537                    ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \
538                    ..\lib\unicore\TestProp.pl
539
540 # Directories of Unicode data files generated by mktables
541 UNIDATADIR1     = ..\lib\unicore\To
542 UNIDATADIR2     = ..\lib\unicore\lib
543
544 PERLEXE_MANIFEST= .\perlexe.manifest
545 PERLEXE_ICO     = .\perlexe.ico
546 PERLEXE_RES     = .\perlexe.res
547 PERLDLL_RES     =
548
549 # Nominate a target which causes extensions to be re-built
550 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
551 # on and really only the interface - i.e. the .def file used to export symbols
552 # from the .dll
553 PERLDEP         = perldll.def
554
555 PL2BAT          = bin\pl2bat.pl
556 GLOBBAT         = bin\perlglob.bat
557
558 UTILS           =                       \
559                 ..\utils\h2ph           \
560                 ..\utils\splain         \
561                 ..\utils\dprofpp        \
562                 ..\utils\perlbug        \
563                 ..\utils\pl2pm          \
564                 ..\utils\c2ph           \
565                 ..\utils\pstruct        \
566                 ..\utils\h2xs           \
567                 ..\utils\perldoc        \
568                 ..\utils\perlivp        \
569                 ..\utils\libnetcfg      \
570                 ..\utils\enc2xs         \
571                 ..\utils\piconv         \
572                 ..\utils\config_data    \
573                 ..\utils\corelist       \
574                 ..\utils\cpan           \
575                 ..\utils\xsubpp         \
576                 ..\utils\prove          \
577                 ..\utils\ptar           \
578                 ..\utils\ptardiff       \
579                 ..\utils\ptargrep       \
580                 ..\utils\cpanp-run-perl \
581                 ..\utils\cpanp  \
582                 ..\utils\cpan2dist      \
583                 ..\utils\shasum         \
584                 ..\utils\instmodsh      \
585                 ..\x2p\find2perl        \
586                 ..\x2p\psed             \
587                 ..\x2p\s2p              \
588                 bin\exetype.pl          \
589                 bin\runperl.pl          \
590                 bin\pl2bat.pl           \
591                 bin\perlglob.pl         \
592                 bin\search.pl
593
594 MAKE            = nmake -nologo
595 MAKE_BARE       = nmake
596
597 !IF "$(WIN64)" == "define"
598 CFGSH_TMPL      = config.vc64
599 CFGH_TMPL       = config_H.vc64
600 !ELSE
601 CFGSH_TMPL      = config.vc
602 CFGH_TMPL       = config_H.vc
603 !ENDIF
604
605 XCOPY           = xcopy /f /r /i /d /y
606 RCOPY           = xcopy /f /r /i /e /d /y
607 NOOP            = @rem
608 NULL            =
609
610 DEL             = del
611
612 MICROCORE_SRC   =               \
613                 ..\av.c         \
614                 ..\deb.c        \
615                 ..\doio.c       \
616                 ..\doop.c       \
617                 ..\dump.c       \
618                 ..\globals.c    \
619                 ..\gv.c         \
620                 ..\mro.c        \
621                 ..\hv.c         \
622                 ..\locale.c     \
623                 ..\mathoms.c    \
624                 ..\mg.c         \
625                 ..\numeric.c    \
626                 ..\op.c         \
627                 ..\pad.c        \
628                 ..\perl.c       \
629                 ..\perlapi.c    \
630                 ..\perly.c      \
631                 ..\pp.c         \
632                 ..\pp_ctl.c     \
633                 ..\pp_hot.c     \
634                 ..\pp_pack.c    \
635                 ..\pp_sort.c    \
636                 ..\pp_sys.c     \
637                 ..\reentr.c     \
638                 ..\regcomp.c    \
639                 ..\regexec.c    \
640                 ..\run.c        \
641                 ..\scope.c      \
642                 ..\sv.c         \
643                 ..\taint.c      \
644                 ..\toke.c       \
645                 ..\universal.c  \
646                 ..\utf8.c       \
647                 ..\util.c
648
649 EXTRACORE_SRC   = $(EXTRACORE_SRC) perllib.c
650
651 !IF "$(PERL_MALLOC)" == "define"
652 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\malloc.c
653 !ENDIF
654
655 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\perlio.c
656
657 WIN32_SRC       =               \
658                 .\win32.c       \
659                 .\win32sck.c    \
660                 .\win32thread.c \
661                 .\fcrypt.c
662
663 # We need this for miniperl build unless we override canned 
664 # config.h #define building mini\*
665 #!IF "$(USE_PERLIO)" == "define"
666 WIN32_SRC       = $(WIN32_SRC) .\win32io.c
667 #!ENDIF
668
669
670 X2P_SRC         =               \
671                 ..\x2p\a2p.c    \
672                 ..\x2p\hash.c   \
673                 ..\x2p\str.c    \
674                 ..\x2p\util.c   \
675                 ..\x2p\walk.c
676
677 CORE_NOCFG_H    =               \
678                 ..\av.h         \
679                 ..\cop.h        \
680                 ..\cv.h         \
681                 ..\dosish.h     \
682                 ..\embed.h      \
683                 ..\form.h       \
684                 ..\gv.h         \
685                 ..\handy.h      \
686                 ..\hv.h         \
687                 ..\iperlsys.h   \
688                 ..\mg.h         \
689                 ..\nostdio.h    \
690                 ..\op.h         \
691                 ..\opcode.h     \
692                 ..\perl.h       \
693                 ..\perlapi.h    \
694                 ..\perlsdio.h   \
695                 ..\perlsfio.h   \
696                 ..\perly.h      \
697                 ..\pp.h         \
698                 ..\proto.h      \
699                 ..\regcomp.h    \
700                 ..\regexp.h     \
701                 ..\scope.h      \
702                 ..\sv.h         \
703                 ..\thread.h     \
704                 ..\unixish.h    \
705                 ..\utf8.h       \
706                 ..\util.h       \
707                 ..\warnings.h   \
708                 ..\XSUB.h       \
709                 ..\EXTERN.h     \
710                 ..\perlvars.h   \
711                 ..\intrpvar.h   \
712                 .\include\dirent.h      \
713                 .\include\netdb.h       \
714                 .\include\sys\socket.h  \
715                 .\win32.h
716
717 CORE_H          = $(CORE_NOCFG_H) .\config.h ..\git_version.h
718
719 UUDMAP_H        = ..\uudmap.h
720 BITCOUNT_H      = ..\bitcount.h
721
722 MICROCORE_OBJ   = $(MICROCORE_SRC:.c=.obj)
723 CORE_OBJ        = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
724 WIN32_OBJ       = $(WIN32_SRC:.c=.obj)
725 MINICORE_OBJ    = $(MICROCORE_OBJ:..\=.\mini\)  \
726                   $(MINIDIR)\miniperlmain$(o)   \
727                   $(MINIDIR)\perlio$(o)
728 MINIWIN32_OBJ   = $(WIN32_OBJ:.\=.\mini\)
729 MINI_OBJ        = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
730 DLL_OBJ         = $(DYNALOADER)
731 X2P_OBJ         = $(X2P_SRC:.c=.obj)
732 GENUUDMAP_OBJ   = $(GENUUDMAP:.exe=.obj)
733
734 PERLDLL_OBJ     = $(CORE_OBJ)
735 PERLEXE_OBJ     = perlmain$(o)
736 PERLEXEST_OBJ   = perlmainst$(o)
737
738 PERLDLL_OBJ     = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
739
740 !IF "$(USE_SETARGV)" != ""
741 SETARGV_OBJ     = setargv$(o)
742 !ENDIF
743
744 !IF "$(ALL_STATIC)" == "define"
745 # some exclusions, unfortunately, until fixed:
746 #  - Win32 extension contains overlapped symbols with win32.c (BUG!)
747 #  - MakeMaker isn't capable enough for SDBM_File (smaller bug)
748 #  - Encode (encoding search algorithm relies on shared library?)
749 STATIC_EXT      = * !Win32 !SDBM_File !Encode
750 !ELSE
751 # specify static extensions here, for example:
752 #STATIC_EXT     = Cwd Compress/Raw/Zlib
753 STATIC_EXT      = Win32CORE
754 !ENDIF
755
756 DYNALOADER      = ..\DynaLoader$(o)
757
758 CFG_VARS        =                                       \
759                 "INST_DRV=$(INST_DRV)"                  \
760                 "INST_TOP=$(INST_TOP)"                  \
761                 "INST_VER=$(INST_VER)"                  \
762                 "INST_ARCH=$(INST_ARCH)"                \
763                 "archname=$(ARCHNAME)"                  \
764                 "cc=$(CC)"                              \
765                 "ld=$(LINK32)"                          \
766                 "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)"        \
767                 "cf_email=$(EMAIL)"                     \
768                 "d_mymalloc=$(PERL_MALLOC)"             \
769                 "libs=$(LIBFILES)"                      \
770                 "incpath=$(CCINCDIR:"=\")"              \
771                 "libperl=$(PERLIMPLIB:..\=)"            \
772                 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")"  \
773                 "libc=$(LIBC)"                          \
774                 "make=$(MAKE_BARE)"                             \
775                 "static_ext=$(STATIC_EXT)"              \
776                 "usethreads=$(USE_ITHREADS)"            \
777                 "useithreads=$(USE_ITHREADS)"           \
778                 "usemultiplicity=$(USE_MULTI)"          \
779                 "useperlio=$(USE_PERLIO)"               \
780                 "uselargefiles=$(USE_LARGE_FILES)"      \
781                 "usesitecustomize=$(USE_SITECUST)"      \
782                 "LINK_FLAGS=$(LINK_FLAGS:"=\")"         \
783                 "optimize=$(OPTIMIZE:"=\")"
784
785 ICWD = -I..\dist\Cwd -I..\dist\Cwd\lib
786
787 #
788 # Top targets
789 #
790
791 all : .\config.h ..\git_version.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) \
792         $(UNIDATAFILES) MakePPPort $(PERLEXE) $(X2P) Extensions_nonxs Extensions $(PERLSTATIC)
793         @echo   Everything is up to date. '$(MAKE_BARE) test' to run test suite.
794
795 regnodes : ..\regnodes.h
796
797 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h        
798
799 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
800
801 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) \
802         $(UNIDATAFILES) $(PERLEXE) $(X2P) Extensions_reonly
803         @echo   Perl and 're' are up to date.
804
805 static: $(PERLEXESTATIC)
806
807 #------------------------------------------------------------
808
809 $(GLOBEXE) : perlglob$(o)
810         $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
811             perlglob$(o) setargv$(o)
812         $(EMBED_EXE_MANI)
813
814 perlglob$(o)  : perlglob.c
815
816 config.w32 : $(CFGSH_TMPL)
817         copy $(CFGSH_TMPL) config.w32
818
819 .\config.h : $(CFGH_TMPL)
820         -del /f config.h
821         copy $(CFGH_TMPL) config.h
822
823 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
824         cd ..
825         miniperl -Ilib make_patchnum.pl
826         cd win32
827
828 # make sure that we recompile perl.c if the git version changes
829 ..\perl$(o) : ..\git_version.h
830
831 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
832         $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
833
834 # this target is for when changes to the main config.sh happen.
835 # edit config.vc, then make perl in a minimal configuration (i.e. with MULTI,
836 # ITHREADS, IMP_SYS, LARGE_FILES, PERLIO and CRYPT off), then make this target
837 # to regenerate config_H.vc.
838 # repeat for config.vc64 and config_H.vc64 if you have a suitable build
839 # environment, otherwise hand-edit them to maintain the same differences with
840 # config.vc and config_H.vc as before.
841 # unfortunately, some further manual editing is also then required to restore all
842 # the special __GNUC__ handling that is otherwise lost.
843 regen_config_h:
844         $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
845         $(MINIPERL) -I..\lib ..\configpm --chdir=..
846         -del /f $(CFGH_TMPL)
847         -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
848         rename config.h $(CFGH_TMPL)
849
850 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
851         $(MINIPERL) -I..\lib ..\configpm --chdir=..
852         if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
853         $(XCOPY) ..\*.h $(COREDIR)\*.*
854         $(XCOPY) *.h $(COREDIR)\*.*
855         $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
856         $(RCOPY) include $(COREDIR)\*.*
857         -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
858         if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
859
860 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
861         $(LINK32) -subsystem:console -out:$@ @<<
862         $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
863 <<
864         $(EMBED_EXE_MANI)
865
866 $(MINIDIR) :
867         if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
868
869 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
870         $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
871
872 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
873         $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
874
875 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
876 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
877 !IF "$(USE_IMP_SYS)" == "define"
878 perllib$(o)     : perllib.c .\perlhost.h .\vdir.h .\vmem.h
879         $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
880 !ENDIF
881
882 # 1. we don't want to rebuild miniperl.exe when config.h changes
883 # 2. we don't want to rebuild miniperl.exe with non-default config.h
884 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
885 $(MINI_OBJ)     : $(CORE_NOCFG_H)
886
887 $(WIN32_OBJ)    : $(CORE_H)
888 $(CORE_OBJ)     : $(CORE_H)
889 $(DLL_OBJ)      : $(CORE_H)
890 $(X2P_OBJ)      : $(CORE_H)
891
892 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl create_perllibst_h.pl
893         $(MINIPERL) -I..\lib create_perllibst_h.pl
894         $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
895             CCTYPE=$(CCTYPE) > perldll.def
896
897 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
898         $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<<
899                 $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
900 <<
901         $(EMBED_DLL_MANI)
902         $(XCOPY) $(PERLIMPLIB) $(COREDIR)
903
904 $(PERLSTATICLIB): Extensions_static
905         $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<<
906                 $(PERLDLL_OBJ)
907 <<
908         $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
909
910 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
911
912 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
913         cd ..
914         miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
915         cd win32
916
917 ..\x2p\a2p$(o) : ..\x2p\a2p.c
918         $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
919
920 ..\x2p\hash$(o) : ..\x2p\hash.c
921         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
922
923 ..\x2p\str$(o) : ..\x2p\str.c
924         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
925
926 ..\x2p\util$(o) : ..\x2p\util.c
927         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
928
929 ..\x2p\walk$(o) : ..\x2p\walk.c
930         $(CC) -I..\x2p  $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
931
932 $(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions
933         $(MINIPERL) -I..\lib ..\x2p\find2perl.PL
934         $(MINIPERL) -I..\lib ..\x2p\s2p.PL
935         $(LINK32) -subsystem:console -out:$@ @<<
936                 $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
937 <<
938         $(EMBED_EXE_MANI)
939
940 $(MINIDIR)\globals$(o) : $(UUDMAP_H) $(BITCOUNT_H)
941
942 $(UUDMAP_H) : $(BITCOUNT_H)
943
944 $(BITCOUNT_H) : $(GENUUDMAP)
945         $(GENUUDMAP) $(UUDMAP_H) $(BITCOUNT_H)
946
947 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
948         $(LINK32) -subsystem:console -out:$@ @<<
949                 $(LINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ)
950 <<
951         $(EMBED_EXE_MANI)
952
953 perlmain.c : runperl.c
954         copy runperl.c perlmain.c
955
956 perlmain$(o) : perlmain.c
957         $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
958
959 perlmainst.c : runperl.c
960         copy runperl.c perlmainst.c
961
962 perlmainst$(o) : perlmainst.c
963         $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
964
965 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
966         $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \
967             $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
968         $(EMBED_EXE_MANI)
969         copy $(PERLEXE) $(WPERLEXE)
970         $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
971
972 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
973         $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) \
974             @Extensions_static $(PERLSTATICLIB) /PDB:NONE \
975             $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
976         $(EMBED_EXE_MANI)
977
978 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
979         $(MINIPERL) -I..\lib $(ICWD) ..\mkppport
980
981 #-------------------------------------------------------------------------------
982 # There's no direct way to mark a dependency on
983 # DynaLoader.pm, so this will have to do
984 Extensions: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
985         $(XCOPY) ..\*.h $(COREDIR)\*.*
986         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
987
988 Extensions_reonly: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
989         $(XCOPY) ..\*.h $(COREDIR)\*.*
990         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
991
992 Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
993         $(XCOPY) ..\*.h $(COREDIR)\*.*
994         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
995         $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
996
997 Extensions_nonxs: ..\make_ext.pl $(PERLDEP) $(CONFIGPM)
998         $(XCOPY) ..\*.h $(COREDIR)\*.*
999         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1000
1001 $(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1002         $(XCOPY) ..\*.h $(COREDIR)\*.*
1003         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1004
1005 Extensions_clean: 
1006         -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1007
1008 Extensions_realclean: 
1009         -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1010
1011 #-------------------------------------------------------------------------------
1012
1013 doc: $(PERLEXE) ..\pod\perltoc.pod
1014         $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1015             --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
1016             --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1017
1018 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1019 # so please check that script before making structural changes here
1020
1021 utils: $(PERLEXE) $(X2P)
1022         cd ..\utils
1023         $(MAKE) PERL=$(MINIPERL)
1024         cd ..\pod
1025         copy ..\README.aix      ..\pod\perlaix.pod
1026         copy ..\README.amiga    ..\pod\perlamiga.pod
1027         copy ..\README.apollo   ..\pod\perlapollo.pod
1028         copy ..\README.beos     ..\pod\perlbeos.pod
1029         copy ..\README.bs2000   ..\pod\perlbs2000.pod
1030         copy ..\README.ce       ..\pod\perlce.pod
1031         copy ..\README.cn       ..\pod\perlcn.pod
1032         copy ..\README.cygwin   ..\pod\perlcygwin.pod
1033         copy ..\README.dgux     ..\pod\perldgux.pod
1034         copy ..\README.dos      ..\pod\perldos.pod
1035         copy ..\README.epoc     ..\pod\perlepoc.pod
1036         copy ..\README.freebsd  ..\pod\perlfreebsd.pod
1037         copy ..\README.haiku    ..\pod\perlhaiku.pod
1038         copy ..\README.hpux     ..\pod\perlhpux.pod
1039         copy ..\README.hurd     ..\pod\perlhurd.pod
1040         copy ..\README.irix     ..\pod\perlirix.pod
1041         copy ..\README.jp       ..\pod\perljp.pod
1042         copy ..\README.ko       ..\pod\perlko.pod
1043         copy ..\README.linux    ..\pod\perllinux.pod
1044         copy ..\README.macos    ..\pod\perlmacos.pod
1045         copy ..\README.macosx   ..\pod\perlmacosx.pod
1046         copy ..\README.mpeix    ..\pod\perlmpeix.pod
1047         copy ..\README.netware  ..\pod\perlnetware.pod
1048         copy ..\README.openbsd  ..\pod\perlopenbsd.pod
1049         copy ..\README.os2      ..\pod\perlos2.pod
1050         copy ..\README.os390    ..\pod\perlos390.pod
1051         copy ..\README.os400    ..\pod\perlos400.pod
1052         copy ..\README.plan9    ..\pod\perlplan9.pod
1053         copy ..\README.qnx      ..\pod\perlqnx.pod
1054         copy ..\README.riscos   ..\pod\perlriscos.pod
1055         copy ..\README.solaris  ..\pod\perlsolaris.pod
1056         copy ..\README.symbian  ..\pod\perlsymbian.pod
1057         copy ..\README.tru64    ..\pod\perltru64.pod
1058         copy ..\README.tw       ..\pod\perltw.pod
1059         copy ..\README.uts      ..\pod\perluts.pod
1060         copy ..\README.vmesa    ..\pod\perlvmesa.pod
1061         copy ..\README.vos      ..\pod\perlvos.pod
1062         copy ..\README.win32    ..\pod\perlwin32.pod
1063         copy ..\pod\perldelta.pod ..\pod\perl5139delta.pod
1064         cd ..\win32
1065         $(PERLEXE) $(PL2BAT) $(UTILS)
1066         $(PERLEXE) $(ICWD) ..\autodoc.pl ..
1067         $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q
1068
1069 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1070         $(PERLEXE) -f ..\pod\buildtoc --build-toc -q
1071
1072 # Note that the pod cleanup in this next section is parsed (and regenerated
1073 # by pod/buildtoc so please check that script before making changes here
1074
1075 distclean: realclean
1076         -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1077                 $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) \
1078                 $(PERLEXESTATIC) $(PERLSTATICLIB)
1079         -del /f *.def *.map
1080         -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1081         -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1082         -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1083         -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1084         -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1085         -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1086         -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1087         -del /f $(LIBDIR)\File\Glob.pm
1088         -del /f $(LIBDIR)\Storable.pm
1089         -del /f $(LIBDIR)\Sys\Hostname.pm
1090         -del /f $(LIBDIR)\Time\HiRes.pm
1091         -del /f $(LIBDIR)\Unicode\Normalize.pm
1092         -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1093         -del /f $(LIBDIR)\Win32.pm
1094         -del /f $(LIBDIR)\Win32CORE.pm
1095         -del /f $(LIBDIR)\Win32API\File.pm
1096         -del /f $(LIBDIR)\Win32API\File\cFile.pc
1097         -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1098         -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1099         -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1100         -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1101         -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1102         -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1103         -if exist $(LIBDIR)\CGI rmdir /s /q $(LIBDIR)\CGI
1104         -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1105         -if exist $(LIBDIR)\CPANPLUS rmdir /s /q $(LIBDIR)\CPANPLUS
1106         -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1107         -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1108         -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1109         -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1110         -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1111         -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1112         -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1113         -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1114         -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1115         -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1116         -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1117         -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1118         -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1119         -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1120         -if exist $(LIBDIR)\I18N\LangTags rmdir /s /q $(LIBDIR)\I18N\LangTags
1121         -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1122         -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q $(LIBDIR)\Module\Pluggable
1123         -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1124         -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1125         -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1126         -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1127         -if exist $(LIBDIR)\Log rmdir /s /q $(LIBDIR)\Log
1128         -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1129         -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1130         -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1131         -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1132         -if exist $(LIBDIR)\mro rmdir /s /q $(LIBDIR)\mro
1133         -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1134         -if exist $(LIBDIR)\Object rmdir /s /q $(LIBDIR)\Object
1135         -if exist $(LIBDIR)\Package rmdir /s /q $(LIBDIR)\Package
1136         -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1137         -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1138         -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1139         -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1140         -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1141         -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1142         -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re
1143         -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1144         -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1145         -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1146         -if exist $(LIBDIR)\Term\UI rmdir /s /q $(LIBDIR)\Term\UI
1147         -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1148         -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1149         -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1150         -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1151         -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1152         -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1153         -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1154         -cd $(PODDIR) && del /f *.html *.bat \
1155             perl5139delta.pod perlaix.pod perlamiga.pod perlapi.pod \
1156             perlapollo.pod perlbeos.pod perlbs2000.pod perlce.pod \
1157             perlcn.pod perlcygwin.pod perldgux.pod perldos.pod perlepoc.pod \
1158             perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \
1159             perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \
1160             perlmacos.pod perlmacosx.pod perlmodlib.pod perlmpeix.pod \
1161             perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1162             perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1163             perlsolaris.pod perlsymbian.pod perltoc.pod perltru64.pod \
1164             perltw.pod perluniprops.pod perluts.pod perlvmesa.pod \
1165             perlvos.pod perlwin32.pod
1166         -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1167             perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
1168             xsubpp instmodsh prove ptar ptardiff ptargrep cpanp-run-perl cpanp cpan2dist shasum corelist config_data
1169         -cd ..\x2p && del /f find2perl s2p psed *.bat
1170         -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1171                 perlmainst.c
1172         -del /f $(CONFIGPM)
1173         -del /f ..\lib\Config_git.pl
1174         -del /f bin\*.bat
1175         -del /f perllibst.h
1176         -del /f $(PERLEXE_RES) perl.base
1177         -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1178         -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1179         -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1180         -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1181         -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1182         -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1183         -if exist pod2htmd.tmp del pod2htmd.tmp
1184         -if exist pod2htmi.tmp del pod2htmi.tmp
1185         -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1186         -del /f ..\t\test_state
1187
1188 install : all installbare installhtml
1189
1190 installbare : utils ..\pod\perltoc.pod
1191         $(PERLEXE) ..\installperl
1192         if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1193         if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1194         $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1195         if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1196         if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1197         $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1198
1199 installhtml : doc
1200         $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1201
1202 inst_lib : $(CONFIGPM)
1203         $(RCOPY) ..\lib $(INST_LIB)\*.*
1204
1205 $(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1206         cd ..\lib\unicore && \
1207         ..\$(MINIPERL) -I.. -I..\..\dist\Cwd\lib -I..\..\dist\Cwd mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
1208
1209 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
1210         $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1211         if exist ..\t\perl.exe del /f ..\t\perl.exe
1212         rename ..\t\miniperl.exe perl.exe
1213         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1214         attrib -r ..\t\*.*
1215         cd ..\t && \
1216         $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1217
1218 test-prep : all utils
1219         $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1220         $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1221         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1222         set PERL_STATIC_EXT=$(STATIC_EXT)
1223
1224 test : test-prep
1225         cd ..\t
1226         $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1227         cd ..\win32
1228
1229 test-reonly : reonly utils
1230         $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1231         $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1232         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1233         cd ..\t
1234         $(PERLEXE) -I..\lib harness $(OPT) -re \bre\\/ $(EXTRA)
1235         cd ..\win32
1236
1237 regen :
1238         cd ..
1239         regen.pl
1240         cd win32
1241
1242 test-notty : test-prep
1243         set PERL_SKIP_TTY_TEST=1
1244         cd ..\t
1245         $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1246         cd ..\win32
1247
1248 _test : 
1249        $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1250        $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1251        $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1252        cd ..\t
1253        $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1254        cd ..\win32
1255
1256 _clean :
1257         -@$(DEL) miniperlmain$(o)
1258         -@$(DEL) $(MINIPERL)
1259         -@$(DEL) perlglob$(o)
1260         -@$(DEL) perlmain$(o)
1261         -@$(DEL) perlmainst$(o)
1262         -@$(DEL) config.w32
1263         -@$(DEL) config.h
1264         -@$(DEL) ..\git_version.h
1265         -@$(DEL) $(GLOBEXE)
1266         -@$(DEL) $(PERLEXE)
1267         -@$(DEL) $(WPERLEXE)
1268         -@$(DEL) $(PERLEXESTATIC)
1269         -@$(DEL) $(PERLSTATICLIB)
1270         -@$(DEL) $(PERLDLL)
1271         -@$(DEL) $(CORE_OBJ)
1272         -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(UUDMAP_H) $(BITCOUNT_H)
1273         -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1274         -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1275         -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1276         -@$(DEL) $(UNIDATAFILES)
1277         -@$(DEL) $(WIN32_OBJ)
1278         -@$(DEL) $(DLL_OBJ)
1279         -@$(DEL) $(X2P_OBJ)
1280         -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1281         -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1282         -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
1283         -@$(DEL) *.ilk
1284         -@$(DEL) *.pdb
1285         -@$(DEL) Extensions_static
1286
1287 clean : Extensions_clean _clean
1288
1289 realclean : Extensions_realclean _clean
1290
1291 # Handy way to run perlbug -ok without having to install and run the
1292 # installed perlbug. We don't re-run the tests here - we trust the user.
1293 # Please *don't* use this unless all tests pass.
1294 # If you want to report test failures, use "nmake nok" instead.
1295 ok: utils
1296         $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1297
1298 okfile: utils
1299         $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1300
1301 nok: utils
1302         $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1303
1304 nokfile: utils
1305         $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok