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