This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate empty conditional branch
[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 # (perl529.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 #
30 #WIN64          = undef
31
32 #
33 # Comment this out if you DON'T want your perl installation to be versioned.
34 # This means that the new installation will overwrite any files from the
35 # old installation at the same INST_TOP location.  Leaving it enabled is
36 # the safest route, as perl adds the extra version directory to all the
37 # locations it installs files to.  If you disable it, an alternative
38 # versioned installation can be obtained by setting INST_TOP above to a
39 # path that includes an arbitrary version string.
40 #
41 #INST_VER       = \5.29.6
42
43 #
44 # Comment this out if you DON'T want your perl installation to have
45 # architecture specific components.  This means that architecture-
46 # specific files will be installed along with the architecture-neutral
47 # files.  Leaving it enabled is safer and more flexible, in case you
48 # want to build multiple flavors of perl and install them together in
49 # the same location.  Commenting it out gives you a simpler
50 # installation that is easier to understand for beginners.
51 #
52 #INST_ARCH      = \$(ARCHNAME)
53
54 #
55 # Uncomment this if you want perl to run
56 #       $Config{sitelibexp}\sitecustomize.pl
57 # before anything else.  This script can then be set up, for example,
58 # to add additional entries to @INC.
59 #
60 #USE_SITECUST   = define
61
62 #
63 # uncomment to enable multiple interpreters.  This is needed for fork()
64 # emulation and for thread support, and is auto-enabled by USE_IMP_SYS
65 # and USE_ITHREADS below.
66 #
67 USE_MULTI       = define
68
69 #
70 # Interpreter cloning/threads; now reasonably complete.
71 # This should be enabled to get the fork() emulation.  This needs (and
72 # will auto-enable) USE_MULTI above.
73 #
74 USE_ITHREADS    = define
75
76 #
77 # uncomment to enable the implicit "host" layer for all system calls
78 # made by perl.  This is also needed to get fork().  This needs (and
79 # will auto-enable) USE_MULTI above.
80 #
81 USE_IMP_SYS     = define
82
83 #
84 # Comment this out if you don't want to enable large file support for
85 # some reason.  Should normally only be changed to maintain compatibility
86 # with an older release of perl.
87 #
88 USE_LARGE_FILES = define
89
90 #
91 # Uncomment this if you're building a 32-bit perl and want 64-bit integers.
92 # (If you're building a 64-bit perl then you will have 64-bit integers whether
93 # or not this is uncommented.)
94 # Note: This option is not supported in 32-bit MSVC60 builds.
95 #
96 #USE_64_BIT_INT = define
97
98 #
99 # Comment this out if you want the legacy default behavior of including '.' at
100 # the end of @INC.
101 #
102 DEFAULT_INC_EXCLUDES_DOT = define
103
104 #
105 # Uncomment this if you want to disable looking up values from
106 # HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl in
107 # the Registry.
108 #
109 #USE_NO_REGISTRY = define
110
111 #
112 # uncomment exactly one of the following
113 #
114 # Visual C++ 6.0 (aka Visual C++ 98)
115 #CCTYPE         = MSVC60
116 # Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
117 #CCTYPE         = MSVC70
118 # Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
119 #CCTYPE         = MSVC70FREE
120 # Windows Server 2003 SP1 Platform SDK (April 2005) (64-bit compiler and tools)
121 #CCTYPE         = SDK2003SP1
122 # Visual C++ 2005 (aka Visual C++ 8.0) (full version or Express Edition)
123 #CCTYPE         = MSVC80
124 # Visual C++ 2008 (aka Visual C++ 9.0) (full version or Express Edition)
125 #CCTYPE         = MSVC90
126 # Visual C++ 2010 (aka Visual C++ 10.0) (full version or Express Edition)
127 #CCTYPE         = MSVC100
128 # Visual C++ 2012 (aka Visual C++ 11.0) (full version or Express Edition)
129 #CCTYPE         = MSVC110
130 # Visual C++ 2013 (aka Visual C++ 12.0) (full version or Express Edition)
131 #CCTYPE         = MSVC120
132 # Visual C++ 2015 (aka Visual C++ 14.0) (full version or Express Edition)
133 #CCTYPE         = MSVC140
134 # Visual C++ 2017 (aka Visual C++ 14.1) (full version or Community Edition)
135 #CCTYPE         = MSVC141
136
137 #
138 # If you are using Intel C++ Compiler uncomment this
139 #
140 #__ICC          = define
141
142 #
143 # Uncomment this if you want to build everything in C++ mode
144 #
145 #USE_CPLUSPLUS  = define
146
147 #
148 # uncomment next line if you want debug version of perl (big/slow)
149 # If not enabled, we automatically try to use maximum optimization
150 # with all compilers that are known to have a working optimizer.
151 #
152 # You can also set CFG = DebugSymbols for a slightly smaller/faster
153 # debug build without the special debugging code in perl which is
154 # enabled via -DDEBUGGING;
155 #
156 # or you can set CFG = DebugFull for an even fuller (bigger/slower)
157 # debug build using the debug version of the CRT, and enabling VC++
158 # debug features such as extra assertions and invalid parameter warnings
159 # in perl and CRT code via -D_DEBUG.  (Note that the invalid parameter
160 # handler does get triggered from time to time in this configuration,
161 # which causes warnings to be printed on STDERR, which in turn causes a
162 # few tests to fail.)
163 #
164 #CFG            = Debug
165
166 #
167 # uncomment to enable linking with setargv.obj under the Visual C
168 # compiler. Setting this options enables perl to expand wildcards in
169 # arguments, but it may be harder to use alternate methods like
170 # File::DosGlob that are more powerful.  This option is supported only with
171 # Visual C.
172 #
173 #USE_SETARGV    = define
174
175 #
176 # set this if you wish to use perl's malloc
177 # WARNING: Turning this on/off WILL break binary compatibility with extensions
178 # you may have compiled with/without it.  Be prepared to recompile all
179 # extensions if you change the default.  Currently, this cannot be enabled
180 # if you ask for USE_IMP_SYS above.
181 #
182 #PERL_MALLOC    = define
183
184 #
185 # set this to enable debugging mstats
186 # This must be enabled to use the Devel::Peek::mstat() function.  This cannot
187 # be enabled without PERL_MALLOC as well.
188 #
189 #DEBUG_MSTATS   = define
190
191 #
192 # set this to additionally provide a statically linked perl-static.exe.
193 # Note that dynamic loading will not work with this perl, so you must
194 # include required modules statically using the STATIC_EXT or ALL_STATIC
195 # variables below. A static library perl529s.lib will also be created.
196 # Ordinary perl.exe is not affected by this option.
197 #
198 #BUILD_STATIC   = define
199
200 #
201 # in addition to BUILD_STATIC the option ALL_STATIC makes *every*
202 # extension get statically built.
203 # This will result in a very large perl executable, but the main purpose
204 # is to have proper linking set so as to be able to create miscellaneous
205 # executables with different built-in extensions.
206 #
207 #ALL_STATIC     = define
208
209 #
210 # set the install location of the compiler
211 # Running VCVARS32.BAT, VCVARSALL.BAT or similar is *required* when using
212 # Visual C++.
213 # Versions of Visual C++ up to VC++ 7.1 define $(MSVCDir); versions since then
214 # define $(VCINSTALLDIR) instead, but for VC++ 14.1 we need the subfolder given
215 # by $(VCToolsInstallDir).
216 #
217 !IF "$(CCTYPE)" == "MSVC60" || \
218     "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
219 CCHOME          = $(MSVCDIR)
220 !ELSE
221 !  IF "$(CCTYPE)" == "MSVC141"
222 CCHOME          = $(VCTOOLSINSTALLDIR)
223 !  ELSE
224 CCHOME          = $(VCINSTALLDIR)
225 !  ENDIF
226 !ENDIF
227
228 #
229 # Additional compiler flags can be specified here.
230 #
231 BUILDOPT        = $(BUILDOPTEXTRA)
232
233 #
234 # This should normally be disabled.  Enabling it will disable the File::Glob
235 # implementation of CORE::glob.
236 #
237 #BUILDOPT       = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
238
239 #
240 # Perl needs to read scripts in text mode so that the DATA filehandle
241 # works correctly with seek() and tell(), or around auto-flushes of
242 # all filehandles (e.g. by system(), backticks, fork(), etc).
243 #
244 # The current version on the ByteLoader module on CPAN however only
245 # works if scripts are read in binary mode.  But before you disable text
246 # mode script reading (and break some DATA filehandle functionality)
247 # please check first if an updated ByteLoader isn't available on CPAN.
248 #
249 BUILDOPT        = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
250
251 #
252 # specify semicolon-separated list of extra directories that modules will
253 # look for libraries (spaces in path names need not be quoted)
254 #
255 EXTRALIBDIRS    =
256
257 #
258 # set this to your email address (perl will guess a value from
259 # from your loginname and your hostname, which may not be right)
260 #
261 #EMAIL          =
262
263 ##
264 ## Build configuration ends.
265 ##
266
267 ##################### CHANGE THESE ONLY IF YOU MUST #####################
268
269 !IF "$(USE_IMP_SYS)" == "define"
270 PERL_MALLOC     = undef
271 DEBUG_MSTATS    = undef
272 !ENDIF
273
274 !IF "$(PERL_MALLOC)" == ""
275 PERL_MALLOC     = undef
276 DEBUG_MSTATS    = undef
277 !ENDIF
278
279 !IF "$(DEBUG_MSTATS)" == ""
280 DEBUG_MSTATS    = undef
281 !ENDIF
282
283 !IF "$(DEBUG_MSTATS)" == "define"
284 BUILDOPT        = $(BUILDOPT) -DPERL_DEBUGGING_MSTATS
285 !ENDIF
286
287 !IF "$(USE_SITECUST)" == ""
288 USE_SITECUST    = undef
289 !ENDIF
290
291 !IF "$(USE_MULTI)" == ""
292 USE_MULTI       = undef
293 !ENDIF
294
295 !IF "$(USE_ITHREADS)" == ""
296 USE_ITHREADS    = undef
297 !ENDIF
298
299 !IF "$(USE_IMP_SYS)" == ""
300 USE_IMP_SYS     = undef
301 !ENDIF
302
303 !IF "$(USE_LARGE_FILES)" == ""
304 USE_LARGE_FILES = undef
305 !ENDIF
306
307 !IF "$(USE_64_BIT_INT)" == ""
308 USE_64_BIT_INT  = undef
309 !ENDIF
310
311 !IF "$(DEFAULT_INC_EXCLUDES_DOT)" == ""
312 DEFAULT_INC_EXCLUDES_DOT = undef
313 !ENDIF
314
315 !IF "$(USE_NO_REGISTRY)" == ""
316 USE_NO_REGISTRY = undef
317 !ENDIF
318
319 !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef"
320 USE_MULTI       = define
321 !ENDIF
322
323 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
324 USE_MULTI       = define
325 !ENDIF
326
327 !IF "$(USE_SITECUST)" == "define"
328 BUILDOPT        = $(BUILDOPT) -DUSE_SITECUSTOMIZE
329 !ENDIF
330
331 !IF "$(USE_MULTI)" != "undef"
332 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
333 !ENDIF
334
335 !IF "$(USE_IMP_SYS)" != "undef"
336 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_SYS
337 !ENDIF
338
339 !IF "$(USE_NO_REGISTRY)" != "undef"
340 BUILDOPT        = $(BUILDOPT) -DWIN32_NO_REGISTRY
341 !ENDIF
342
343 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
344 PROCESSOR_ARCHITECTURE  = x86
345 !ENDIF
346
347 !IF "$(WIN64)" == ""
348 # When we are running from a 32bit cmd.exe on AMD64 then
349 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
350 # is set to AMD64
351 !IF "$(PROCESSOR_ARCHITEW6432)" != ""
352 PROCESSOR_ARCHITECTURE  = $(PROCESSOR_ARCHITEW6432)
353 WIN64                   = define
354 !ELSE
355 !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
356 WIN64                   = define
357 !ELSE
358 WIN64                   = undef
359 !ENDIF
360 !ENDIF
361 !ENDIF
362
363 !IF "$(WIN64)" == "define"
364 USE_64_BIT_INT  = define
365 !ENDIF
366
367 # Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
368 # both link against MSVCRT.dll (which is part of Windows itself) and
369 # not against a compiler specific versioned runtime.
370 !IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
371 CCTYPE          = SDK2003SP1
372 !ENDIF
373
374 # Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
375 # does not support it.
376 !IF "$(CCTYPE)" == "MSVC60"
377 !UNDEF USE_64_BIT_INT
378 USE_64_BIT_INT  = undef
379 !ENDIF
380
381 # Most relevant compiler-specific options fall into two groups:
382 # either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
383 !IF "$(CCTYPE)" == "MSVC60" || \
384     "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
385 PREMSVC80       = define
386 !ELSE
387 PREMSVC80       = undef
388 !ENDIF
389
390 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
391 !IF "$(ARCHITECTURE)" == "AMD64"
392 ARCHITECTURE    = x64
393 !ENDIF
394 !IF "$(ARCHITECTURE)" == "IA64"
395 ARCHITECTURE    = ia64
396 !ENDIF
397
398 !IF "$(USE_MULTI)" == "define"
399 ARCHNAME        = MSWin32-$(ARCHITECTURE)-multi
400 !ELSE
401 ARCHNAME        = MSWin32-$(ARCHITECTURE)-perlio
402 !ENDIF
403
404 !IF "$(USE_ITHREADS)" == "define"
405 ARCHNAME        = $(ARCHNAME)-thread
406 !ENDIF
407
408 !IF "$(WIN64)" != "define"
409 !IF "$(USE_64_BIT_INT)" == "define"
410 ARCHNAME        = $(ARCHNAME)-64int
411 !ENDIF
412 !ENDIF
413
414 # All but the free version of VC++ 7.1 can load DLLs on demand.  Makes the test
415 # suite run in about 10% less time.
416 !IF "$(CCTYPE)" != "MSVC70FREE"
417 # If no registry, advapi32 is only used for Perl_pp_getlogin/getlogin/GetUserNameA
418 # which is rare to execute
419 !IF "$(USE_NO_REGISTRY)" != "undef"
420 DELAYLOAD       = -DELAYLOAD:ws2_32.dll -DELAYLOAD:advapi32.dll delayimp.lib
421 MINIDELAYLOAD   =
422 !ELSE
423 DELAYLOAD       = -DELAYLOAD:ws2_32.dll delayimp.lib
424 #miniperl never does any registry lookups
425 MINIDELAYLOAD   = -DELAYLOAD:advapi32.dll
426 !ENDIF
427 !ENDIF
428
429 # Visual C++ 2005 and 2008 (VC++ 8.0 and 9.0) create manifest files for EXEs and
430 # DLLs. These either need copying everywhere with the binaries, or else need
431 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. For
432 # simplicity, embed them if they exist (and delete them afterwards so that they
433 # don't get installed too).
434 EMBED_EXE_MANI  = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
435                   if exist $@.manifest del $@.manifest
436 EMBED_DLL_MANI  = if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
437                   if exist $@.manifest del $@.manifest
438
439 # Set the install location of the compiler headers/libraries.
440 # These are saved into $Config{incpath} and $Config{libpth}.
441 CCINCDIR        = $(CCHOME)\include
442 !IF "$(CCTYPE)" == "MSVC141"
443 !  IF "$(WIN64)" == "define"
444 CCLIBDIR        = $(CCHOME)\lib\x64
445 !  ELSE
446 CCLIBDIR        = $(CCHOME)\lib\x86
447 !  ENDIF
448 !ELSE
449 !  IF "$(WIN64)" == "define"
450 CCLIBDIR        = $(CCHOME)\lib\amd64
451 !  ELSE
452 CCLIBDIR        = $(CCHOME)\lib
453 !  ENDIF
454 !ENDIF
455
456 ARCHDIR         = ..\lib\$(ARCHNAME)
457 COREDIR         = ..\lib\CORE
458 AUTODIR         = ..\lib\auto
459 LIBDIR          = ..\lib
460 EXTDIR          = ..\ext
461 DISTDIR         = ..\dist
462 CPANDIR         = ..\cpan
463 PODDIR          = ..\pod
464 HTMLDIR         = .\html
465
466 INST_SCRIPT     = $(INST_TOP)$(INST_VER)\bin
467 INST_BIN        = $(INST_SCRIPT)$(INST_ARCH)
468 INST_LIB        = $(INST_TOP)$(INST_VER)\lib
469 INST_ARCHLIB    = $(INST_LIB)$(INST_ARCH)
470 INST_COREDIR    = $(INST_ARCHLIB)\CORE
471 INST_HTML       = $(INST_TOP)$(INST_VER)\html
472
473 #
474 # Programs to compile, build .lib files and link
475 #
476
477 # Poison the recipe if no CCTYPE is set, and delete mini\.exists so everything
478 # is rebuilt next time to avoid reusing a mini config.h written with no sane CC
479 # version set
480 !IF "$(CCTYPE)" == ""
481 CC              = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
482 LINK32          = @echo CCTYPE makefile variable not set && del mini\.exists && exit 1 &&
483 !ELSE IF "$(__ICC)" != "define"
484 CC              = cl
485 LINK32          = link
486 !ELSE
487 CC              = icl
488 LINK32          = xilink
489 !ENDIF
490 LIB32           = $(LINK32) -lib
491 RSC             = rc
492
493 #
494 # Options
495 #
496
497 INCLUDES        = -I$(COREDIR) -I.\include -I. -I..
498 #PCHFLAGS       = -Fpc:\temp\vcmoduls.pch -YX
499 DEFINES         = -DWIN32 -D_CONSOLE -DNO_STRICT
500 LOCDEFS         = -DPERLDLL -DPERL_CORE
501 CXX_FLAG        = -TP -EHsc
502
503 !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
504 LIBC            = ucrt.lib
505 !ELSE
506 LIBC            = msvcrt.lib
507 !ENDIF
508
509 !IF  "$(CFG)" == "Debug"
510 OPTIMIZE        = -Od -MD -Zi -DDEBUGGING
511 LINK_DBG        = -debug
512 !ELSE
513 !IF  "$(CFG)" == "DebugSymbols"
514 OPTIMIZE        = -Od -MD -Zi
515 LINK_DBG        = -debug
516 !ELSE
517 !IF  "$(CFG)" == "DebugFull"
518 !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
519 LIBC            = ucrtd.lib
520 !ELSE
521 LIBC            = msvcrtd.lib
522 !ENDIF
523 OPTIMIZE        = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
524 LINK_DBG        = -debug
525 !ELSE
526 # -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
527 OPTIMIZE        = -O1 -MD -Zi -DNDEBUG
528 # we enable debug symbols in release builds also
529 LINK_DBG        = -debug -opt:ref,icf
530 # you may want to enable this if you want COFF symbols in the executables
531 # in addition to the PDB symbols.  The default Dr. Watson that ships with
532 # Windows can use the the former but not latter.  The free WinDbg can be
533 # installed to get better stack traces from just the PDB symbols, so we
534 # avoid the bloat of COFF symbols by default.
535 #LINK_DBG       = $(LINK_DBG) -debugtype:both
536 !  IF "$(CCTYPE)" != "MSVC60"
537 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
538 OPTIMIZE        = $(OPTIMIZE) -GL
539 LINK_DBG        = $(LINK_DBG) -ltcg
540 LIB_FLAGS       = -ltcg
541 !  ENDIF
542 !ENDIF
543 !ENDIF
544 !ENDIF
545
546 !IF "$(WIN64)" == "define"
547 DEFINES         = $(DEFINES) -DWIN64 -DCONSERVATIVE
548 OPTIMIZE        = $(OPTIMIZE) -fp:precise
549 !ENDIF
550
551 # For now, silence warnings from VC++ 8.0 onwards about "unsafe" CRT functions
552 # and POSIX CRT function names being deprecated.
553 !IF "$(PREMSVC80)" == "undef"
554 DEFINES         = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
555 !ENDIF
556
557 # Likewise for deprecated Winsock APIs in VC++ 14.0 onwards for now.
558 !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
559 DEFINES         = $(DEFINES) -D_WINSOCK_DEPRECATED_NO_WARNINGS
560 !ENDIF
561
562 # The Windows Server 2003 SP1 SDK compiler only defines _configthreadlocale() if
563 # _MT is defined, i.e. when using /MT (the LIBCMT.lib version of the CRT), which
564 # the perl build doesn't use. We therefore specify NO_THREAD_SAFE_LOCALE so that
565 # perl.h doesn't set USE_THREAD_SAFE_LOCALE, which it otherwise would do since
566 # _MSC_VER is 1400 for this compiler (as per MSVC80).
567 !IF "$(CCTYPE)" == "SDK2003SP1"
568 DEFINES         = $(DEFINES) -DNO_THREAD_SAFE_LOCALE
569 !ENDIF
570
571 # In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
572 # 64-bit, even in 32-bit mode.  It also provides the _USE_32BIT_TIME_T
573 # preprocessor option to revert back to the old functionality for
574 # backward compatibility.  We define this symbol here for older 32-bit
575 # compilers only (which aren't using it at all) for the sole purpose
576 # of getting it into $Config{ccflags}.  That way if someone builds
577 # Perl itself with e.g. VC6 but later installs an XS module using VC8
578 # the time_t types will still be compatible.
579 !IF "$(WIN64)" == "undef"
580 !  IF "$(PREMSVC80)" == "define"
581 BUILDOPT        = $(BUILDOPT) -D_USE_32BIT_TIME_T
582 !  ENDIF
583 !ENDIF
584
585 LIBBASEFILES    = \
586                 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
587                 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
588                 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
589                 version.lib odbc32.lib odbccp32.lib comctl32.lib
590
591 !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
592 !  IF  "$(CFG)" == "DebugFull"
593 LIBBASEFILES    = $(LIBBASEFILES) msvcrtd.lib vcruntimed.lib
594 !  ELSE
595 LIBBASEFILES    = $(LIBBASEFILES) msvcrt.lib vcruntime.lib
596 !  ENDIF
597 !ENDIF
598
599 # Avoid __intel_new_proc_init link error for libircmt.
600 # libmmd is /MD equivelent, other variants exist.
601 # libmmd is Intel C's math addon funcs to MS CRT, contains long doubles, C99,
602 # and optimized C89 funcs
603 !IF "$(__ICC)" == "define"
604 LIBBASEFILES    = $(LIBBASEFILES) libircmt.lib libmmd.lib
605 !ENDIF
606
607 # The Windows Server 2003 SP1 SDK compiler links against MSVCRT.dll, which
608 # doesn't include the buffer overrun verification code used by the /GS switch.
609 # Since the code links against libraries that are compiled with /GS, this
610 # "security cookie verification" code must be included via bufferoverflow.lib.
611 !IF "$(CCTYPE)" == "SDK2003SP1"
612 LIBBASEFILES    = $(LIBBASEFILES) bufferoverflowU.lib
613 !ENDIF
614
615 LIBFILES        = $(LIBBASEFILES) $(LIBC)
616
617 #EXTRACFLAGS    = -nologo -GF -W4 -wd4127 -wd4706
618 EXTRACFLAGS     = -nologo -GF -W3
619 !IF "$(__ICC)" == "define"
620 EXTRACFLAGS     = $(EXTRACFLAGS) -Qstd=c99
621 !ENDIF
622 !IF "$(USE_CPLUSPLUS)" == "define"
623 EXTRACFLAGS     = $(EXTRACFLAGS) $(CXX_FLAG)
624 !ENDIF
625 CFLAGS          = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
626                 $(PCHFLAGS) $(OPTIMIZE)
627 LINK_FLAGS      = -nologo -nodefaultlib $(LINK_DBG) \
628                 -libpath:"$(INST_COREDIR)" \
629                 -machine:$(PROCESSOR_ARCHITECTURE)
630 LIB_FLAGS       = $(LIB_FLAGS) -nologo
631 OBJOUT_FLAG     = -Fo
632 EXEOUT_FLAG     = -Fe
633
634 CFLAGS_O        = $(CFLAGS) $(BUILDOPT)
635
636 !IF "$(PREMSVC80)" == "undef"
637 PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
638 !ELSE
639 RSC_FLAGS       = -DINCLUDE_MANIFEST
640 !ENDIF
641
642 # VS 2017 (VC++ 14.1) requires at minimum Windows 7 SP1 (with latest Windows Updates)
643
644 # For XP support in >= VS 2013 (VC++ 12.0), subsystem is always in Config.pm
645 # LINK_FLAGS else subsystem is only needed for EXE building, not XS DLL building
646 # Console vs GUI makes no difference for DLLs, so use default for cleaner
647 # building cmd lines
648 !IF "$(CCTYPE)" == "MSVC120" || "$(CCTYPE)" == "MSVC140"
649 !  IF "$(WIN64)" == "define"
650 LINK_FLAGS      = $(LINK_FLAGS) -subsystem:console,"5.02"
651 !  ELSE
652 LINK_FLAGS      = $(LINK_FLAGS) -subsystem:console,"5.01"
653 !  ENDIF
654
655 !ELSE
656 PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) -subsystem:console
657 !ENDIF
658
659 BLINK_FLAGS     = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
660
661 #################### do not edit below this line #######################
662 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
663
664 o = .obj
665
666 #
667 # Rules
668 #
669
670 #clear the list, we dont support .cxx .bas .cbl .for .pas .f .f90
671 # .asm .cpp are not currently used but they are included for completeness
672 .SUFFIXES :
673 .SUFFIXES : .c $(o) .cpp .asm .dll .lib .exe .rc .res
674
675 .c$(o):
676         $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
677
678 .c.i:
679         $(CC) -c -I$(<D) $(CFLAGS_O) -P $(OBJOUT_FLAG)$@ $<
680
681 .y.c:
682         $(NOOP)
683
684 $(o).dll:
685         $(LINK32) -dll -implib:$(*B).lib -def:$(*B).def \
686             -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
687         $(EMBED_DLL_MANI)
688
689 .rc.res:
690         $(RSC) -i.. $(RSC_FLAGS) $<
691
692 #
693 # various targets
694
695 # makedef.pl must be updated if this changes, and this should normally
696 # only change when there is an incompatible revision of the public API.
697 PERLIMPLIB      = ..\perl529.lib
698 PERLSTATICLIB   = ..\perl529s.lib
699 PERLDLL         = ..\perl529.dll
700
701 MINIPERL        = ..\miniperl.exe
702 MINIDIR         = .\mini
703 PERLEXE         = ..\perl.exe
704 WPERLEXE        = ..\wperl.exe
705 PERLEXESTATIC   = ..\perl-static.exe
706 GLOBEXE         = ..\perlglob.exe
707 CONFIGPM        = ..\lib\Config.pm ..\lib\Config_heavy.pl
708 GENUUDMAP       = ..\generate_uudmap.exe
709 !IF "$(BUILD_STATIC)" == "define" || "$(ALL_STATIC)" == "define"
710 PERLSTATIC      = static
711 !ELSE
712 PERLSTATIC      = 
713 !ENDIF
714
715 # Unicode data files generated by mktables
716 FIRSTUNIFILE     = ..\lib\unicore\Decomposition.pl
717 UNIDATAFILES     = ..\lib\unicore\Decomposition.pl \
718                    ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
719                    ..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst     \
720                    ..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm            \
721                    ..\lib\unicore\TestProp.pl
722
723 # Directories of Unicode data files generated by mktables
724 UNIDATADIR1     = ..\lib\unicore\To
725 UNIDATADIR2     = ..\lib\unicore\lib
726
727 PERLEXE_MANIFEST= .\perlexe.manifest
728 PERLEXE_ICO     = .\perlexe.ico
729 PERLEXE_RES     = .\perlexe.res
730 PERLDLL_RES     =
731
732 # Nominate a target which causes extensions to be re-built
733 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
734 # on and really only the interface - i.e. the .def file used to export symbols
735 # from the .dll
736 PERLDEP         = perldll.def
737
738 PL2BAT          = bin\pl2bat.pl
739 GLOBBAT         = bin\perlglob.bat
740
741 UTILS           =                       \
742                 ..\utils\h2ph           \
743                 ..\utils\splain         \
744                 ..\utils\perlbug        \
745                 ..\utils\pl2pm          \
746                 ..\utils\h2xs           \
747                 ..\utils\perldoc        \
748                 ..\utils\perlivp        \
749                 ..\utils\libnetcfg      \
750                 ..\utils\enc2xs         \
751                 ..\utils\encguess               \
752                 ..\utils\piconv         \
753                 ..\utils\corelist       \
754                 ..\utils\cpan           \
755                 ..\utils\xsubpp         \
756                 ..\utils\prove          \
757                 ..\utils\ptar           \
758                 ..\utils\ptardiff       \
759                 ..\utils\ptargrep       \
760                 ..\utils\zipdetails     \
761                 ..\utils\shasum         \
762                 ..\utils\instmodsh      \
763                 ..\utils\json_pp        \
764                 ..\utils\pod2html       \
765                 bin\exetype.pl          \
766                 bin\runperl.pl          \
767                 bin\pl2bat.pl           \
768                 bin\perlglob.pl         \
769                 bin\search.pl
770
771 MAKE            = nmake -nologo
772 MAKE_BARE       = nmake
773
774 CFGSH_TMPL      = config.vc
775 CFGH_TMPL       = config_H.vc
776 INT64           = __int64
777
778 XCOPY           = xcopy /f /r /i /d /y
779 RCOPY           = xcopy /f /r /i /e /d /y
780 NOOP            = @rem
781 NULL            =
782
783 DEL             = del
784
785 MICROCORE_SRC   =               \
786                 ..\av.c         \
787                 ..\caretx.c     \
788                 ..\deb.c        \
789                 ..\doio.c       \
790                 ..\doop.c       \
791                 ..\dquote.c     \
792                 ..\dump.c       \
793                 ..\globals.c    \
794                 ..\gv.c         \
795                 ..\mro_core.c   \
796                 ..\hv.c         \
797                 ..\locale.c     \
798                 ..\keywords.c   \
799                 ..\mathoms.c    \
800                 ..\mg.c         \
801                 ..\numeric.c    \
802                 ..\op.c         \
803                 ..\pad.c        \
804                 ..\perl.c       \
805                 ..\perlapi.c    \
806                 ..\perly.c      \
807                 ..\pp.c         \
808                 ..\pp_ctl.c     \
809                 ..\pp_hot.c     \
810                 ..\pp_pack.c    \
811                 ..\pp_sort.c    \
812                 ..\pp_sys.c     \
813                 ..\reentr.c     \
814                 ..\regcomp.c    \
815                 ..\regexec.c    \
816                 ..\run.c        \
817                 ..\scope.c      \
818                 ..\sv.c         \
819                 ..\taint.c      \
820                 ..\time64.c     \
821                 ..\toke.c       \
822                 ..\universal.c  \
823                 ..\utf8.c       \
824                 ..\util.c
825
826 EXTRACORE_SRC   = $(EXTRACORE_SRC) perllib.c
827
828 !IF "$(PERL_MALLOC)" == "define"
829 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\malloc.c
830 !ENDIF
831
832 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\perlio.c
833
834 WIN32_SRC       =               \
835                 .\win32.c       \
836                 .\win32io.c     \
837                 .\win32sck.c    \
838                 .\win32thread.c \
839                 .\fcrypt.c
840
841 CORE_NOCFG_H    =               \
842                 ..\av.h         \
843                 ..\cop.h        \
844                 ..\cv.h         \
845                 ..\dosish.h     \
846                 ..\embed.h      \
847                 ..\form.h       \
848                 ..\gv.h         \
849                 ..\handy.h      \
850                 ..\hv.h         \
851                 ..\hv_func.h    \
852                 ..\iperlsys.h   \
853                 ..\mg.h         \
854                 ..\nostdio.h    \
855                 ..\op.h         \
856                 ..\opcode.h     \
857                 ..\perl.h       \
858                 ..\perlapi.h    \
859                 ..\perlsdio.h   \
860                 ..\perly.h      \
861                 ..\pp.h         \
862                 ..\proto.h      \
863                 ..\regcomp.h    \
864                 ..\regexp.h     \
865                 ..\scope.h      \
866                 ..\sv.h         \
867                 ..\thread.h     \
868                 ..\unixish.h    \
869                 ..\utf8.h       \
870                 ..\util.h       \
871                 ..\warnings.h   \
872                 ..\XSUB.h       \
873                 ..\EXTERN.h     \
874                 ..\perlvars.h   \
875                 ..\intrpvar.h   \
876                 .\include\dirent.h      \
877                 .\include\netdb.h       \
878                 .\include\sys\errno2.h  \
879                 .\include\sys\socket.h  \
880                 .\win32.h
881
882 CORE_H          = $(CORE_NOCFG_H) .\config.h ..\git_version.h
883
884 UUDMAP_H        = ..\uudmap.h
885 BITCOUNT_H      = ..\bitcount.h
886 MG_DATA_H       = ..\mg_data.h
887 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
888
889 MICROCORE_OBJ   = $(MICROCORE_SRC:.c=.obj)
890 CORE_OBJ        = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
891 WIN32_OBJ       = $(WIN32_SRC:.c=.obj)
892 MINICORE_OBJ    = $(MICROCORE_OBJ:..\=.\mini\)  \
893                   $(MINIDIR)\miniperlmain$(o)   \
894                   $(MINIDIR)\perlio$(o)
895 MINIWIN32_OBJ   = $(WIN32_OBJ:.\=.\mini\)
896 MINI_OBJ        = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
897 DLL_OBJ         = $(DYNALOADER)
898 GENUUDMAP_OBJ   = $(GENUUDMAP:.exe=.obj)
899
900 PERLDLL_OBJ     = $(CORE_OBJ)
901 PERLEXE_OBJ     = perlmain$(o)
902 PERLEXEST_OBJ   = perlmainst$(o)
903
904 PERLDLL_OBJ     = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
905
906 !IF "$(USE_SETARGV)" != ""
907 SETARGV_OBJ     = setargv$(o)
908 !ENDIF
909
910 !IF "$(ALL_STATIC)" == "define"
911 # some exclusions, unfortunately, until fixed:
912 #  - MakeMaker isn't capable enough for SDBM_File (small bug)
913 STATIC_EXT      = * !SDBM_File
914 !ELSE
915 # specify static extensions here, for example:
916 # (be sure to include Win32CORE to load Win32 on demand)
917 #STATIC_EXT     = Win32CORE Cwd Compress/Raw/Zlib
918 STATIC_EXT      = Win32CORE
919 !ENDIF
920
921 DYNALOADER      = ..\DynaLoader$(o)
922
923 CFG_VARS        =                                       \
924                 "INST_TOP=$(INST_TOP)"                  \
925                 "INST_VER=$(INST_VER)"                  \
926                 "INST_ARCH=$(INST_ARCH)"                \
927                 "archname=$(ARCHNAME)"                  \
928                 "cc=$(CC)"                              \
929                 "ld=$(LINK32)"                          \
930                 "ccflags=$(EXTRACFLAGS) $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)"        \
931                 "usecplusplus=$(USE_CPLUSPLUS)"         \
932                 "cf_email=$(EMAIL)"                     \
933                 "d_mymalloc=$(PERL_MALLOC)"             \
934                 "libs=$(LIBFILES)"                      \
935                 "incpath=$(CCINCDIR:"=\")"              \
936                 "libperl=$(PERLIMPLIB:..\=)"            \
937                 "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")"  \
938                 "libc=$(LIBC)"                          \
939                 "make=$(MAKE_BARE)"                             \
940                 "static_ext=$(STATIC_EXT)"              \
941                 "usethreads=$(USE_ITHREADS)"            \
942                 "useithreads=$(USE_ITHREADS)"           \
943                 "usemultiplicity=$(USE_MULTI)"          \
944                 "use64bitint=$(USE_64_BIT_INT)"         \
945                 "uselongdouble=undef"                   \
946                 "uselargefiles=$(USE_LARGE_FILES)"      \
947                 "usesitecustomize=$(USE_SITECUST)"      \
948                 "default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)"  \
949                 "LINK_FLAGS=$(LINK_FLAGS:"=\")"         \
950                 "optimize=$(OPTIMIZE:"=\")"             \
951                 "WIN64=$(WIN64)"
952
953 #
954 # Top targets
955 #
956
957 all : ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
958         $(UNIDATAFILES) MakePPPort $(PERLEXE) Extensions_nonxs Extensions PostExt \
959         $(PERLSTATIC)
960         @echo   Everything is up to date. '$(MAKE_BARE) test' to run test suite.
961
962 regnodes : ..\regnodes.h
963
964 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
965
966 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
967
968 reonly : regnodes .\config.h ..\git_version.h $(GLOBEXE) $(CONFIGPM) \
969         $(UNIDATAFILES) $(PERLEXE) Extensions_reonly
970         @echo   Perl and 're' are up to date.
971
972 static: $(PERLEXESTATIC)
973
974 #------------------------------------------------------------
975
976 $(GLOBEXE) : perlglob$(o)
977         $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ \
978             perlglob$(o) setargv$(o)
979         $(EMBED_EXE_MANI)
980
981 perlglob$(o)  : perlglob.c
982
983 ..\git_version.h : $(MINIPERL) ..\make_patchnum.pl
984         cd .. && miniperl -Ilib make_patchnum.pl && cd win32
985
986 # make sure that we recompile perl.c if the git version changes
987 ..\perl$(o) : ..\git_version.h
988
989 ..\config.sh : $(CFGSH_TMPL) config_sh.PL FindExt.pm $(MINIPERL)
990         $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
991
992 # This target is for when changes to the main config.sh happen.
993 # Edit config.vc, then make perl in a minimal configuration (i.e. with MULTI,
994 # ITHREADS, IMP_SYS and LARGE_FILES off), then make this target
995 # to regenerate config_H.vc.
996 regen_config_h:
997         $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
998         $(MINIPERL) -I..\lib ..\configpm --chdir=..
999         -del /f $(CFGH_TMPL)
1000         -$(MINIPERL) -I..\lib config_h.PL
1001         rename config.h $(CFGH_TMPL)
1002
1003 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL
1004         $(MINIPERL) -I..\lib ..\configpm --chdir=..
1005         $(XCOPY) ..\*.h $(COREDIR)\*.*
1006         $(XCOPY) *.h $(COREDIR)\*.*
1007         $(RCOPY) include $(COREDIR)\*.*
1008         -$(MINIPERL) -I..\lib config_h.PL
1009         if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
1010
1011 .\config.h : $(CONFIGPM)
1012
1013 # See the comment in Makefile.SH explaining this seemingly cranky ordering
1014 $(MINIPERL) : ..\lib\buildcustomize.pl
1015
1016 ..\lib\buildcustomize.pl : $(MINI_OBJ) ..\write_buildcustomize.pl
1017         $(LINK32) -out:$(MINIPERL) @<<
1018         $(BLINK_FLAGS) $(DELAYLOAD) $(MINIDELAYLOAD) $(LIBFILES) $(MINI_OBJ)
1019 <<
1020         $(EMBED_EXE_MANI:..\lib\buildcustomize.pl=..\miniperl.exe)
1021         $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
1022
1023 $(MINIDIR)\.exists : $(CFGH_TMPL)
1024         if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1025 #
1026 # Copy the template config.h and set configurables at the end of it
1027 # as per the options chosen and compiler used.
1028 # Note: This config.h is only used to build miniperl.exe anyway, but
1029 # it's as well to have its options correct to be sure that it builds
1030 # and so that it's "-V" options are correct for use by makedef.pl. The
1031 # real config.h used to build perl.exe is generated from the top-level
1032 # config_h.SH by config_h.PL (run by miniperl.exe).
1033 #
1034         copy $(CFGH_TMPL) config.h
1035         @(echo.&& \
1036         echo #ifndef _config_h_footer_&& \
1037         echo #define _config_h_footer_&& \
1038         echo #undef Off_t&& \
1039         echo #undef LSEEKSIZE&& \
1040         echo #undef Off_t_size&& \
1041         echo #undef PTRSIZE&& \
1042         echo #undef SSize_t&& \
1043         echo #undef HAS_ATOLL&& \
1044         echo #undef HAS_STRTOLL&& \
1045         echo #undef HAS_STRTOULL&& \
1046         echo #undef Size_t_size&& \
1047         echo #undef IVTYPE&& \
1048         echo #undef UVTYPE&& \
1049         echo #undef IVSIZE&& \
1050         echo #undef UVSIZE&& \
1051         echo #undef NV_PRESERVES_UV&& \
1052         echo #undef NV_PRESERVES_UV_BITS&& \
1053         echo #undef IVdf&& \
1054         echo #undef UVuf&& \
1055         echo #undef UVof&& \
1056         echo #undef UVxf&& \
1057         echo #undef UVXf&& \
1058         echo #undef USE_64_BIT_INT&& \
1059         echo #undef USE_LONG_DOUBLE&& \
1060         echo #undef USE_CPLUSPLUS)>> config.h
1061 !IF "$(CCTYPE)" == "MSVC140" || "$(CCTYPE)" == "MSVC141"
1062         @(echo #undef FILE_ptr&& \
1063         echo #undef FILE_cnt&& \
1064         echo #undef FILE_base&& \
1065         echo #undef FILE_bufsiz&& \
1066         echo #define FILE_ptr^(fp^) PERLIO_FILE_ptr^(fp^)&& \
1067         echo #define FILE_cnt^(fp^) PERLIO_FILE_cnt^(fp^)&& \
1068         echo #define FILE_base^(fp^) PERLIO_FILE_base^(fp^)&& \
1069         echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
1070         echo #define I_STDBOOL)>> config.h
1071 !ENDIF
1072 !IF "$(USE_LARGE_FILES)"=="define"
1073         @(echo #define Off_t $(INT64)&& \
1074         echo #define LSEEKSIZE ^8&& \
1075         echo #define Off_t_size ^8)>> config.h
1076 !ELSE
1077         @(echo #define Off_t long&& \
1078         echo #define LSEEKSIZE ^4&& \
1079         echo #define Off_t_size ^4)>> config.h
1080 !ENDIF
1081 !IF "$(WIN64)"=="define"
1082         @(echo #define PTRSIZE ^8&& \
1083         echo #define SSize_t $(INT64)&& \
1084         echo #define HAS_ATOLL&& \
1085         echo #define HAS_STRTOLL&& \
1086         echo #define HAS_STRTOULL&& \
1087         echo #define Size_t_size ^8)>> config.h
1088 !ELSE
1089         @(echo #define PTRSIZE ^4&& \
1090         echo #define SSize_t int&& \
1091         echo #undef HAS_ATOLL&& \
1092         echo #undef HAS_STRTOLL&& \
1093         echo #undef HAS_STRTOULL&& \
1094         echo #define Size_t_size ^4)>> config.h
1095 !ENDIF
1096 !IF "$(USE_64_BIT_INT)"=="define"
1097         @(echo #define IVTYPE $(INT64)&& \
1098         echo #define UVTYPE unsigned $(INT64)&& \
1099         echo #define IVSIZE ^8&& \
1100         echo #define UVSIZE ^8&& \
1101         echo #undef NV_PRESERVES_UV&& \
1102         echo #define NV_PRESERVES_UV_BITS 53&& \
1103         echo #define IVdf "I64d"&& \
1104         echo #define UVuf "I64u"&& \
1105         echo #define UVof "I64o"&& \
1106         echo #define UVxf "I64x"&& \
1107         echo #define UVXf "I64X"&& \
1108         echo #define USE_64_BIT_INT)>> config.h
1109 !ELSE
1110         @(echo #define IVTYPE long&& \
1111         echo #define UVTYPE unsigned long&& \
1112         echo #define IVSIZE ^4&& \
1113         echo #define UVSIZE ^4&& \
1114         echo #define NV_PRESERVES_UV&& \
1115         echo #define NV_PRESERVES_UV_BITS 32&& \
1116         echo #define IVdf "ld"&& \
1117         echo #define UVuf "lu"&& \
1118         echo #define UVof "lo"&& \
1119         echo #define UVxf "lx"&& \
1120         echo #define UVXf "lX"&& \
1121         echo #undef USE_64_BIT_INT)>> config.h
1122 !ENDIF
1123 !IF "$(USE_CPLUSPLUS)"=="define"
1124         @(echo #define USE_CPLUSPLUS&& \
1125         echo #endif)>> config.h
1126 !ELSE
1127         @(echo #undef USE_CPLUSPLUS&& \
1128         echo #endif)>> config.h
1129 !ENDIF
1130 #separate line since this is sentinal that this target is done
1131         @rem. > $(MINIDIR)\.exists
1132
1133 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1134         $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ ..\$(*F).c
1135
1136 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1137         $(CC) -c $(CFLAGS) -DPERL_IS_MINIPERL $(OBJOUT_FLAG)$@ $(*F).c
1138
1139 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1140 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1141 !IF "$(USE_IMP_SYS)" == "define"
1142 perllib$(o)     : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1143         $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1144 !ENDIF
1145
1146 # 1. we don't want to rebuild miniperl.exe when config.h changes
1147 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1148 # 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
1149 $(MINI_OBJ)     : $(MINIDIR)\.exists $(CORE_NOCFG_H)
1150
1151 $(WIN32_OBJ)    : $(CORE_H)
1152 $(CORE_OBJ)     : $(CORE_H)
1153 $(DLL_OBJ)      : $(CORE_H)
1154
1155 perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
1156         $(MINIPERL) -I..\lib create_perllibst_h.pl
1157         $(MINIPERL) -I..\lib -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
1158             CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def
1159
1160 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1161         $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<<
1162                 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
1163 <<
1164         $(EMBED_DLL_MANI)
1165         $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1166
1167 $(PERLSTATICLIB): Extensions_static
1168         $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static @<<
1169                 $(PERLDLL_OBJ)
1170 <<
1171         $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1172
1173 $(PERLEXE_RES): perlexe.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
1174
1175 $(MINIDIR)\globals$(o) : $(GENERATED_HEADERS)
1176
1177 $(UUDMAP_H) $(MG_DATA_H) : $(BITCOUNT_H)
1178
1179 $(BITCOUNT_H) : $(GENUUDMAP)
1180         $(GENUUDMAP) $(GENERATED_HEADERS)
1181
1182 $(GENUUDMAP_OBJ) : ..\mg_raw.h
1183
1184 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1185         $(LINK32) -out:$@ @<<
1186                 $(BLINK_FLAGS) $(LIBFILES) $(GENUUDMAP_OBJ)
1187 <<
1188         $(EMBED_EXE_MANI)
1189
1190 perlmain.c : runperl.c
1191         copy runperl.c perlmain.c
1192
1193 perlmain$(o) : perlmain.c
1194         $(CC) $(CFLAGS_O:-DPERLDLL=-UPERLDLL) $(OBJOUT_FLAG)$@ -c perlmain.c
1195
1196 perlmainst.c : runperl.c
1197         copy runperl.c perlmainst.c
1198
1199 perlmainst$(o) : perlmainst.c
1200         $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1201
1202 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1203         $(LINK32) -out:$@ $(BLINK_FLAGS) \
1204             $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES) $(SETARGV_OBJ)
1205         $(EMBED_EXE_MANI)
1206         copy $(PERLEXE) $(WPERLEXE)
1207         $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1208
1209 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1210         $(LINK32) -out:$@ $(BLINK_FLAGS) \
1211             $(PERLEXEST_OBJ) $(PERLEXE_RES) $(PERLSTATICLIB) $(LIBFILES) $(SETARGV_OBJ)
1212         $(EMBED_EXE_MANI)
1213
1214 MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
1215         $(MINIPERL) -I..\lib ..\mkppport
1216
1217 #-------------------------------------------------------------------------------
1218 # There's no direct way to mark a dependency on
1219 # DynaLoader.pm, so this will have to do
1220 Extensions: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1221         $(XCOPY) ..\*.h $(COREDIR)\*.*
1222         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic
1223
1224 Extensions_reonly: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
1225         $(XCOPY) ..\*.h $(COREDIR)\*.*
1226         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
1227
1228 Extensions_static : ..\make_ext.pl ..\lib\buildcustomize.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1229         $(XCOPY) ..\*.h $(COREDIR)\*.*
1230         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
1231         $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
1232
1233 Extensions_nonxs: ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) ..\pod\perlfunc.pod
1234         $(XCOPY) ..\*.h $(COREDIR)\*.*
1235         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --nonxs
1236
1237 $(DYNALOADER) : ..\make_ext.pl ..\lib\buildcustomize.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
1238         $(XCOPY) ..\*.h $(COREDIR)\*.*
1239         $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
1240
1241 Extensions_clean: 
1242         -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=clean
1243
1244 Extensions_realclean: 
1245         -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --all --target=realclean
1246
1247 PostExt: ..\lib\Storable\Limit.pm
1248
1249 ..\lib\Storable\Limit.pm: $(PERLEXE) Extensions
1250         cd ..\dist\Storable && $(MAKE) lib\Storable\Limit.pm
1251         if not exist ..\lib\Storable mkdir ..\lib\Storable
1252         copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm
1253
1254 #-------------------------------------------------------------------------------
1255
1256 doc: $(PERLEXE) ..\pod\perltoc.pod
1257         $(PERLEXE) ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1258             --podpath=pod:lib:utils --htmlroot="file://$(INST_HTML::=|)" \
1259             --recurse
1260
1261 ..\utils\Makefile: $(CONFIGPM) ..\utils\Makefile.PL
1262         $(MINIPERL) -I..\lib ..\utils\Makefile.PL ..
1263
1264 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1265 # so please check that script before making structural changes here
1266
1267 utils: $(PERLEXE) ..\utils\Makefile
1268         cd ..\utils
1269         $(MAKE) PERL=$(MINIPERL)
1270         cd ..\pod
1271         copy ..\README.aix      ..\pod\perlaix.pod
1272         copy ..\README.amiga    ..\pod\perlamiga.pod
1273         copy ..\README.android  ..\pod\perlandroid.pod
1274         copy ..\README.bs2000   ..\pod\perlbs2000.pod
1275         copy ..\README.ce       ..\pod\perlce.pod
1276         copy ..\README.cn       ..\pod\perlcn.pod
1277         copy ..\README.cygwin   ..\pod\perlcygwin.pod
1278         copy ..\README.dos      ..\pod\perldos.pod
1279         copy ..\README.freebsd  ..\pod\perlfreebsd.pod
1280         copy ..\README.haiku    ..\pod\perlhaiku.pod
1281         copy ..\README.hpux     ..\pod\perlhpux.pod
1282         copy ..\README.hurd     ..\pod\perlhurd.pod
1283         copy ..\README.irix     ..\pod\perlirix.pod
1284         copy ..\README.jp       ..\pod\perljp.pod
1285         copy ..\README.ko       ..\pod\perlko.pod
1286         copy ..\README.linux    ..\pod\perllinux.pod
1287         copy ..\README.macos    ..\pod\perlmacos.pod
1288         copy ..\README.macosx   ..\pod\perlmacosx.pod
1289         copy ..\README.netware  ..\pod\perlnetware.pod
1290         copy ..\README.openbsd  ..\pod\perlopenbsd.pod
1291         copy ..\README.os2      ..\pod\perlos2.pod
1292         copy ..\README.os390    ..\pod\perlos390.pod
1293         copy ..\README.os400    ..\pod\perlos400.pod
1294         copy ..\README.plan9    ..\pod\perlplan9.pod
1295         copy ..\README.qnx      ..\pod\perlqnx.pod
1296         copy ..\README.riscos   ..\pod\perlriscos.pod
1297         copy ..\README.solaris  ..\pod\perlsolaris.pod
1298         copy ..\README.symbian  ..\pod\perlsymbian.pod
1299         copy ..\README.synology ..\pod\perlsynology.pod
1300         copy ..\README.tru64    ..\pod\perltru64.pod
1301         copy ..\README.tw       ..\pod\perltw.pod
1302         copy ..\README.vos      ..\pod\perlvos.pod
1303         copy ..\README.win32    ..\pod\perlwin32.pod
1304         copy ..\pod\perldelta.pod ..\pod\perl5296delta.pod
1305         cd ..\win32
1306         $(PERLEXE) $(PL2BAT) $(UTILS)
1307         $(MINIPERL) -I..\lib ..\autodoc.pl ..
1308         $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q ..
1309
1310 ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs
1311         $(PERLEXE) -f ..\pod\buildtoc -q
1312
1313 # Note that the pod cleanup in this next section is parsed (and regenerated
1314 # by pod/buildtoc so please check that script before making changes here
1315
1316 distclean: realclean
1317         -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1318                 $(PERLIMPLIB) ..\miniperl.lib $(PERLEXESTATIC) $(PERLSTATICLIB)
1319         -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1320         -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1321         -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
1322         -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1323         -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1324         -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1325         -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1326         -del /f $(LIBDIR)\File\Glob.pm
1327         -del /f $(LIBDIR)\Storable.pm
1328         -del /f $(LIBDIR)\Sys\Hostname.pm
1329         -del /f $(LIBDIR)\Time\HiRes.pm
1330         -del /f $(LIBDIR)\Unicode\Normalize.pm
1331         -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1332         -del /f $(LIBDIR)\Storable.pm $(LIBDIR)\Storable\Limit.pm
1333         -del /f $(LIBDIR)\Win32.pm
1334         -del /f $(LIBDIR)\Win32CORE.pm
1335         -del /f $(LIBDIR)\Win32API\File.pm
1336         -del /f $(LIBDIR)\Win32API\File\cFile.pc
1337         -del /f $(LIBDIR)\buildcustomize.pl
1338         -del /f $(DISTDIR)\XSLoader\XSLoader.pm
1339         -del /f *.def *.map
1340         -if exist $(LIBDIR)\Amiga rmdir /s /q $(LIBDIR)\Amiga
1341         -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
1342         -if exist $(LIBDIR)\Archive rmdir /s /q $(LIBDIR)\Archive
1343         -if exist $(LIBDIR)\Attribute rmdir /s /q $(LIBDIR)\Attribute
1344         -if exist $(LIBDIR)\autodie rmdir /s /q $(LIBDIR)\autodie
1345         -if exist $(LIBDIR)\Carp rmdir /s /q $(LIBDIR)\Carp
1346         -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1347         -if exist $(LIBDIR)\Config\Perl rmdir /s /q $(LIBDIR)\Config\Perl
1348         -if exist $(LIBDIR)\CPAN rmdir /s /q $(LIBDIR)\CPAN
1349         -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1350         -if exist $(LIBDIR)\Devel rmdir /s /q $(LIBDIR)\Devel
1351         -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
1352         -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1353         -if exist $(LIBDIR)\encoding rmdir /s /q $(LIBDIR)\encoding
1354         -if exist $(LIBDIR)\Exporter rmdir /s /q $(LIBDIR)\Exporter
1355         -if exist $(LIBDIR)\ExtUtils\CBuilder rmdir /s /q $(LIBDIR)\ExtUtils\CBuilder
1356         -if exist $(LIBDIR)\ExtUtils\Command rmdir /s /q $(LIBDIR)\ExtUtils\Command
1357         -if exist $(LIBDIR)\ExtUtils\Constant rmdir /s /q $(LIBDIR)\ExtUtils\Constant
1358         -if exist $(LIBDIR)\ExtUtils\Liblist rmdir /s /q $(LIBDIR)\ExtUtils\Liblist
1359         -if exist $(LIBDIR)\ExtUtils\MakeMaker rmdir /s /q $(LIBDIR)\ExtUtils\MakeMaker
1360         -if exist $(LIBDIR)\ExtUtils\ParseXS rmdir /s /q $(LIBDIR)\ExtUtils\ParseXS
1361         -if exist $(LIBDIR)\ExtUtils\Typemaps rmdir /s /q $(LIBDIR)\ExtUtils\Typemaps
1362         -if exist $(LIBDIR)\File\Spec rmdir /s /q $(LIBDIR)\File\Spec
1363         -if exist $(LIBDIR)\Filter rmdir /s /q $(LIBDIR)\Filter
1364         -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1365         -if exist $(LIBDIR)\HTTP rmdir /s /q $(LIBDIR)\HTTP
1366         -if exist $(LIBDIR)\I18N rmdir /s /q $(LIBDIR)\I18N
1367         -if exist $(LIBDIR)\inc rmdir /s /q $(LIBDIR)\inc
1368         -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
1369         -if exist $(LIBDIR)\IPC rmdir /s /q $(LIBDIR)\IPC
1370         -if exist $(LIBDIR)\JSON rmdir /s /q $(LIBDIR)\JSON
1371         -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1372         -if exist $(LIBDIR)\Locale rmdir /s /q $(LIBDIR)\Locale
1373         -if exist $(LIBDIR)\Math rmdir /s /q $(LIBDIR)\Math
1374         -if exist $(LIBDIR)\Memoize rmdir /s /q $(LIBDIR)\Memoize
1375         -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1376         -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module
1377         -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP
1378         -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params
1379         -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse
1380         -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl
1381         -if exist $(LIBDIR)\PerlIO rmdir /s /q $(LIBDIR)\PerlIO
1382         -if exist $(LIBDIR)\Pod\Perldoc rmdir /s /q $(LIBDIR)\Pod\Perldoc
1383         -if exist $(LIBDIR)\Pod\Simple rmdir /s /q $(LIBDIR)\Pod\Simple
1384         -if exist $(LIBDIR)\Pod\Text rmdir /s /q $(LIBDIR)\Pod\Text
1385         -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1386         -if exist $(LIBDIR)\Search rmdir /s /q $(LIBDIR)\Search
1387         -if exist $(LIBDIR)\Sub rmdir /s /q $(LIBDIR)\Sub
1388         -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1389         -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
1390         -if exist $(LIBDIR)\Term rmdir /s /q $(LIBDIR)\Term
1391         -if exist $(LIBDIR)\Test rmdir /s /q $(LIBDIR)\Test
1392         -if exist $(LIBDIR)\Test2 rmdir /s /q $(LIBDIR)\Test2
1393         -if exist $(LIBDIR)\Text rmdir /s /q $(LIBDIR)\Text
1394         -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
1395         -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1396         -if exist $(LIBDIR)\Tie\Hash rmdir /s /q $(LIBDIR)\Tie\Hash
1397         -if exist $(LIBDIR)\Unicode\Collate rmdir /s /q $(LIBDIR)\Unicode\Collate
1398         -if exist $(LIBDIR)\Unicode\Collate\Locale rmdir /s /q $(LIBDIR)\Unicode\Collate\Locale
1399         -if exist $(LIBDIR)\version rmdir /s /q $(LIBDIR)\version
1400         -if exist $(LIBDIR)\VMS rmdir /s /q $(LIBDIR)\VMS
1401         -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1402         -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1403         -cd $(PODDIR) && del /f *.html *.bat roffitall \
1404             perl5296delta.pod perlaix.pod perlamiga.pod perlandroid.pod \
1405             perlapi.pod perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1406             perldos.pod perlfreebsd.pod perlhaiku.pod perlhpux.pod \
1407             perlhurd.pod perlintern.pod perlirix.pod perljp.pod perlko.pod \
1408             perllinux.pod perlmacos.pod perlmacosx.pod perlmodlib.pod \
1409             perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1410             perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1411             perlsolaris.pod perlsymbian.pod perlsynology.pod perltoc.pod \
1412             perltru64.pod perltw.pod perluniprops.pod perlvos.pod \
1413             perlwin32.pod
1414         -cd ..\utils && del /f h2ph splain perlbug pl2pm h2xs \
1415             perldoc perlivp libnetcfg enc2xs encguess piconv cpan *.bat \
1416             xsubpp pod2html instmodsh json_pp prove ptar ptardiff ptargrep shasum corelist zipdetails
1417         -del /f ..\config.sh perlmain.c dlutils.c config.h.new \
1418                 perlmainst.c
1419         -del /f $(CONFIGPM)
1420         -del /f ..\lib\Config_git.pl
1421         -del /f bin\*.bat
1422         -del /f perllibst.h
1423         -del /f $(PERLEXE_RES) perl.base
1424         -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib ppport.h
1425         -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1426         -cd $(DISTDIR) && del /s *.def Makefile Makefile.old
1427         -cd $(CPANDIR) && del /s *.def Makefile Makefile.old
1428         -del /s ..\utils\Makefile
1429         -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1430         -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1431         -if exist pod2htmd.tmp del pod2htmd.tmp
1432         -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1433         -del /f ..\t\test_state
1434
1435 install : all installbare installhtml
1436
1437 installbare : utils ..\pod\perltoc.pod
1438         $(PERLEXE) ..\installperl
1439         if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1440         if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1441         $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1442         if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1443         $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1444
1445 installhtml : doc
1446         $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1447
1448 inst_lib : $(CONFIGPM)
1449         $(RCOPY) ..\lib $(INST_LIB)\*.*
1450
1451 $(UNIDATAFILES) ..\pod\perluniprops.pod : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs
1452         cd ..\lib\unicore && \
1453         ..\$(MINIPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
1454
1455 minitest : .\config.h $(MINIPERL) ..\git_version.h $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES)
1456         $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1457         if exist ..\t\perl.exe del /f ..\t\perl.exe
1458         rename ..\t\miniperl.exe perl.exe
1459         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1460 # Note this perl.exe is miniperl
1461         cd ..\t && perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
1462
1463 test-prep : all utils ../pod/perltoc.pod
1464         $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1465         $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1466         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1467         set PERL_STATIC_EXT=$(STATIC_EXT)
1468
1469 test : test-prep
1470         cd ..\t
1471         perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1472         cd ..\win32
1473
1474 test_porting : test-prep
1475         cd ..\t
1476         perl.exe harness $(TEST_SWITCHES) porting\*.t ..\lib\diagnostics.t
1477         cd ..\win32
1478
1479 test-reonly : reonly utils
1480         $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1481         $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1482         $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1483         cd ..\t
1484         perl.exe harness $(OPT) -re \bre\\/ $(EXTRA)
1485         cd ..\win32
1486
1487 regen :
1488         cd ..
1489         regen.pl
1490         cd win32
1491
1492 test-notty : test-prep
1493         set PERL_SKIP_TTY_TEST=1
1494         cd ..\t
1495         perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1496         cd ..\win32
1497
1498 _test : 
1499        $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1500        $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1501        $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1502        cd ..\t
1503        perl.exe harness $(TEST_SWITCHES) $(TEST_FILES)
1504        cd ..\win32
1505
1506 _clean :
1507         -@$(DEL) miniperlmain$(o)
1508         -@$(DEL) $(MINIPERL)
1509         -@$(DEL) perlglob$(o)
1510         -@$(DEL) perlmain$(o)
1511         -@$(DEL) perlmainst$(o)
1512         -@$(DEL) config.h
1513         -@$(DEL) ..\git_version.h
1514         -@$(DEL) $(GLOBEXE)
1515         -@$(DEL) $(PERLEXE)
1516         -@$(DEL) $(WPERLEXE)
1517         -@$(DEL) $(PERLEXESTATIC)
1518         -@$(DEL) $(PERLSTATICLIB)
1519         -@$(DEL) $(PERLDLL)
1520         -@$(DEL) $(CORE_OBJ)
1521         -@$(DEL) $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
1522         -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1523         -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1524         -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1525         -@$(DEL) $(UNIDATAFILES)
1526         -@$(DEL) $(WIN32_OBJ)
1527         -@$(DEL) $(DLL_OBJ)
1528         -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1529         -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
1530         -@$(DEL) *.ilk
1531         -@$(DEL) *.pdb
1532         -@$(DEL) Extensions_static
1533
1534 clean : Extensions_clean _clean
1535
1536 realclean : Extensions_realclean _clean
1537
1538 # Handy way to run perlbug -ok without having to install and run the
1539 # installed perlbug. We don't re-run the tests here - we trust the user.
1540 # Please *don't* use this unless all tests pass.
1541 # If you want to report test failures, use "nmake nok" instead.
1542 ok: utils
1543         $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)"
1544
1545 okfile: utils
1546         $(PERLEXE) ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1547
1548 nok: utils
1549         $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)"
1550
1551 nokfile: utils
1552         $(PERLEXE) ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok