comparison perl-5.22.2/win32/Makefile @ 8045:a16537d2fe07

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