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