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