2 # Makefile to build perl on Windows NT using DMAKE.
4 # Visual C++ 2.0 or later
5 # Borland C++ 5.02 or later
6 # MinGW with gcc-2.95.2 or later
7 # MS Platform SDK 64-bit compiler and tools **experimental**
9 # This is set up to build a perl.exe that runs off a shared library
10 # (perl59.dll). Also makes individual DLLs for the XS extensions.
14 ## Make sure you read README.win32 *before* you mess with anything here!
18 ## Build configuration. Edit the values below to suit your needs.
22 # Set these to wherever you want "dmake install" to put your
26 INST_TOP *= $(INST_DRV)\perl
29 # Comment this out if you DON'T want your perl installation to be versioned.
30 # This means that the new installation will overwrite any files from the
31 # old installation at the same INST_TOP location. Leaving it enabled is
32 # the safest route, as perl adds the extra version directory to all the
33 # locations it installs files to. If you disable it, an alternative
34 # versioned installation can be obtained by setting INST_TOP above to a
35 # path that includes an arbitrary version string.
40 # Comment this out if you DON'T want your perl installation to have
41 # architecture specific components. This means that architecture-
42 # specific files will be installed along with the architecture-neutral
43 # files. Leaving it enabled is safer and more flexible, in case you
44 # want to build multiple flavors of perl and install them together in
45 # the same location. Commenting it out gives you a simpler
46 # installation that is easier to understand for beginners.
48 #INST_ARCH *= \$(ARCHNAME)
51 # Uncomment this if you want perl to run
52 # $Config{sitelibexp}\sitecustomize.pl
53 # before anything else. This script can then be set up, for example,
54 # to add additional entries to @INC.
56 #USE_SITECUST *= define
59 # uncomment to enable multiple interpreters. This is need for fork()
60 # emulation and for thread support.
65 # Interpreter cloning/threads; now reasonably complete.
66 # This should be enabled to get the fork() emulation.
67 # This needs USE_MULTI above.
69 USE_ITHREADS *= define
72 # uncomment to enable the implicit "host" layer for all system calls
73 # made by perl. This needs USE_MULTI above.
74 # This is also needed to get fork().
79 # Comment out next assign to disable perl's I/O subsystem and use compiler's
80 # stdio for IO - depending on your compiler vendor and run time library you may
81 # then get a number of fails from make test i.e. bugs - complain to them not us ;-).
82 # You will also be unable to take full advantage of perl5.8's support for multiple
83 # encodings and may see lower IO performance. You have been warned.
87 # Comment this out if you don't want to enable large file support for
88 # some reason. Should normally only be changed to maintain compatibility
89 # with an older release of perl.
90 USE_LARGE_FILES *= define
93 # uncomment exactly one of the following
97 # Visual C++ > 2.x and < 6.x
99 # Visual C++ 6.x (aka Visual C++ 98)
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)
105 # Visual C++ 2005 Express Edition (aka Visual C++ 8.x) (free version)
106 #CCTYPE *= MSVC80FREE
107 # Visual C++ 2005 (aka Visual C++ 8.x) (full version)
109 # Visual C++ 2008 Express Edition (aka Visual C++ 9.x) (free version)
110 #CCTYPE *= MSVC90FREE
111 # Visual C++ 2008 (aka Visual C++ 9.x) (full version)
113 # Borland 5.02 or later
115 # MinGW with gcc-2.95.2 or later
119 # uncomment this if your Borland compiler is older than v5.4.
122 # uncomment this if you want to use Borland's VCL as your CRT
126 # uncomment this if you are compiling under Windows 95/98 and command.com
127 # (not needed if you're running under 4DOS/NT 6.01 or later)
131 # uncomment next line if you want debug version of perl (big,slow)
132 # If not enabled, we automatically try to use maximum optimization
133 # with all compilers that are known to have a working optimizer.
138 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
139 # It has patches that fix known bugs in older versions of MSVCRT.DLL.
140 # This currently requires VC 5.0 with Service Pack 3 or later.
141 # Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
142 # and follow the directions in the package to install.
144 # Not recommended if you have VC 6.x and you're not running Windows 9x.
146 #USE_PERLCRT *= define
149 # uncomment to enable linking with setargv.obj under the Visual C
150 # compiler. Setting this options enables perl to expand wildcards in
151 # arguments, but it may be harder to use alternate methods like
152 # File::DosGlob that are more powerful. This option is supported only with
155 #USE_SETARGV *= define
158 # if you want to have the crypt() builtin function implemented, leave this or
159 # CRYPT_LIB uncommented. The fcrypt.c file named here contains a suitable
160 # version of des_fcrypt().
162 CRYPT_SRC *= fcrypt.c
165 # if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
166 # library, uncomment this, and make sure the library exists (see README.win32)
167 # Specify the full pathname of the library.
169 #CRYPT_LIB *= fcrypt.lib
172 # set this if you wish to use perl's malloc
173 # WARNING: Turning this on/off WILL break binary compatibility with extensions
174 # you may have compiled with/without it. Be prepared to recompile all
175 # extensions if you change the default. Currently, this cannot be enabled
176 # if you ask for USE_IMP_SYS above.
178 #PERL_MALLOC *= define
181 # set this to enable debugging mstats
182 # This must be enabled to use the Devel::Peek::mstat() function. This cannot
183 # be enabled without PERL_MALLOC as well.
185 #DEBUG_MSTATS *= define
188 # set this to additionally provide a statically linked perl-static.exe.
189 # Note that dynamic loading will not work with this perl, so you must
190 # include required modules statically using STATIC_EXT variable below.
191 # A static library perl59s.lib will also be created.
192 # Ordinary perl.exe is not affected by this option.
194 #BUILD_STATIC *= define
197 # set the install locations of the compiler include/libraries
198 # Running VCVARS32.BAT is *required* when using Visual C.
199 # Some versions of Visual C don't define MSVCDIR in the environment,
200 # so you may have to set CCHOME explicitly (spaces in the path name should
203 .IF "$(CCTYPE)" == "BORLAND"
204 CCHOME *= C:\Borland\BCC55
205 .ELIF "$(CCTYPE)" == "GCC"
210 CCINCDIR *= $(CCHOME)\include
211 CCLIBDIR *= $(CCHOME)\lib
214 # Additional compiler flags can be specified here.
216 BUILDOPT *= $(BUILDOPTEXTRA)
219 # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's
220 # internal hash function unless the PERL_HASH_SEED environment variable is set.
221 # Alternatively, adding -DNO_HASH_SEED will completely disable the
222 # randomization feature.
223 # The latter is required to maintain binary compatibility with Perl 5.8.0.
225 #BUILDOPT += -DPERL_HASH_SEED_EXPLICIT
226 #BUILDOPT += -DNO_HASH_SEED
229 # This should normally be disabled. Adding -DPERL_POLLUTE enables support
230 # for old symbols by default, at the expense of extreme pollution. You most
231 # probably just want to build modules that won't compile with
232 # perl Makefile.PL POLLUTE=1
233 # instead of enabling this. Please report such modules to the respective
236 #BUILDOPT += -DPERL_POLLUTE
239 # This should normally be disabled. Enabling it will disable the File::Glob
240 # implementation of CORE::glob.
242 #BUILDOPT += -DPERL_EXTERNAL_GLOB
245 # This should normally be disabled. Enabling it causes perl to read scripts
246 # in text mode (which is the 5.005 behavior) and will break ByteLoader.
248 #BUILDOPT += -DPERL_TEXTMODE_SCRIPTS
251 # specify semicolon-separated list of extra directories that modules will
252 # look for libraries (spaces in path names need not be quoted)
257 # set this to point to cmd.exe (only needed if you use some
258 # alternate shell that doesn't grok cmd.exe style commands)
260 #SHELL *= g:\winnt\system32\cmd.exe
263 # set this to your email address (perl will guess a value from
264 # from your loginname and your hostname, which may not be right)
269 ## Build configuration ends.
272 ##################### CHANGE THESE ONLY IF YOU MUST #####################
274 .IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
278 CRYPT_FLAG = -DHAVE_DES_FCRYPT
282 DEBUG_MSTATS *= undef
284 USE_SITECUST *= undef
286 USE_ITHREADS *= undef
289 USE_LARGE_FILES *= undef
292 .IF "$(USE_IMP_SYS)" == "define"
296 .IF "$(PERL_MALLOC)" == "undef"
300 .IF "$(DEBUG_MSTATS)" == "define"
301 BUILDOPT += -DPERL_DEBUGGING_MSTATS
304 .IF "$(USE_IMP_SYS) $(USE_MULTI)" == "define undef"
308 .IF "$(USE_ITHREADS) $(USE_MULTI)" == "define undef"
312 .IF "$(USE_SITECUST)" == "define"
313 BUILDOPT += -DUSE_SITECUSTOMIZE
316 .IF "$(USE_MULTI)" != "undef"
317 BUILDOPT += -DPERL_IMPLICIT_CONTEXT
320 .IF "$(USE_IMP_SYS)" != "undef"
321 BUILDOPT += -DPERL_IMPLICIT_SYS
324 .IMPORT .IGNORE : PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432
326 PROCESSOR_ARCHITECTURE *= x86
329 # When we are running from a 32bit cmd.exe on AMD64 then
330 # PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
332 .IF "$(PROCESSOR_ARCHITEW6432)" != ""
333 PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
335 .ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
342 ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
343 .IF "$(ARCHITECTURE)" == "AMD64"
346 .IF "$(ARCHITECTURE)" == "IA64"
350 .IF "$(USE_MULTI)" == "define"
351 ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
353 .IF "$(USE_PERLIO)" == "define"
354 ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
356 ARCHNAME = MSWin32-$(ARCHITECTURE)
360 .IF "$(USE_ITHREADS)" == "define"
361 ARCHNAME !:= $(ARCHNAME)-thread
364 # Visual C++ 98, .NET 2003, 2005 and 2008 specific.
365 # VC++ 6.x, 7.x, 8.x and 9.x can load DLL's on demand. Makes the test suite run
366 # in about 10% less time. (The free version of 7.x can't do this, but the free
367 # versions of 8.x and 9.x can.)
368 .IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || \
369 "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" ||
370 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
371 DELAYLOAD *= -DELAYLOAD:ws2_32.dll delayimp.lib
374 # Visual C++ 2005 and 2008 (VC++ 8.x and 9.x) create manifest files for EXEs and
375 # DLLs. These either need copying everywhere with the binaries, or else need
376 # embedding in them otherwise MSVCR80.dll or MSVCR90.dll won't be found. Embed
377 # them for simplicity, and delete them afterwards so that they don't get
379 .IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
380 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
381 EMBED_EXE_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
383 EMBED_DLL_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
387 ARCHDIR = ..\lib\$(ARCHNAME)
388 COREDIR = ..\lib\CORE
389 AUTODIR = ..\lib\auto
393 EXTUTILSDIR = $(LIBDIR)\ExtUtils
397 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
398 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
399 INST_LIB = $(INST_TOP)$(INST_VER)\lib
400 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
401 INST_COREDIR = $(INST_ARCHLIB)\CORE
402 INST_HTML = $(INST_TOP)$(INST_VER)\html
405 # Programs to compile, build .lib files and link
410 .IF "$(CCTYPE)" == "BORLAND"
413 .IF "$(BCCOLD)" != "define"
418 LIB32 = tlib /a /P128
425 INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
426 #PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
427 DEFINES = -DWIN32 $(CRYPT_FLAG)
428 LOCDEFS = -DPERLDLL -DPERL_CORE
434 # same libs as MSVC, except Borland doesn't have oldnames.lib
435 LIBFILES = $(CRYPT_LIB) \
436 kernel32.lib user32.lib gdi32.lib winspool.lib \
437 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
438 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
439 version.lib odbc32.lib odbccp32.lib \
442 .IF "$(CFG)" == "Debug"
443 OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
446 OPTIMIZE = -O2 -D_RTLDLL
451 CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
452 $(PCHFLAGS) $(OPTIMIZE)
453 LINK_FLAGS = $(LINK_DBG) -x -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \
458 .IF "$(BCCOLD)" != "define"
460 DEFINES += -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0x0410
462 .IF "$(BCCVCL)" == "define"
463 LIBC = cp32mti.lib vcl.lib vcl50.lib vclx50.lib vcle50.lib
464 LINK_FLAGS += -L"$(CCLIBDIR)\Release"
468 .ELIF "$(CCTYPE)" == "GCC"
484 INCLUDES = -I.\include -I. -I.. -I$(COREDIR)
485 DEFINES = -DWIN32 $(CRYPT_FLAG)
486 LOCDEFS = -DPERLDLL -DPERL_CORE
493 LIBFILES = $(CRYPT_LIB) $(LIBC) \
494 -lmoldname -lkernel32 -luser32 -lgdi32 \
495 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
496 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
497 -lwinmm -lversion -lodbc32 -lodbccp32
499 .IF "$(CFG)" == "Debug"
500 OPTIMIZE = -g -O2 -DDEBUGGING
508 CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
509 LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
514 # NOTE: we assume that GCC uses MSVCRT.DLL
515 # See comments about PERL_MSVCRT_READFIX in the "cl" compiler section below.
516 BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
522 LIB32 = $(LINK32) -lib
529 INCLUDES = -I$(COREDIR) -I.\include -I. -I..
530 #PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
531 DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
532 LOCDEFS = -DPERLDLL -DPERL_CORE
536 .IF "$(USE_PERLCRT)" != "define"
542 .IF "$(CFG)" == "Debug"
543 .IF "$(CCTYPE)" == "MSVC20"
544 OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
546 OPTIMIZE = -O1 -MD -Zi -DDEBUGGING
550 OPTIMIZE = -MD -Zi -DNDEBUG
551 # we enable debug symbols in release builds also
552 LINK_DBG = -debug -opt:ref,icf
553 # you may want to enable this if you want COFF symbols in the executables
554 # in addition to the PDB symbols. The default Dr. Watson that ships with
555 # Windows can use the the former but not latter. The free WinDbg can be
556 # installed to get better stack traces from just the PDB symbols, so we
557 # avoid the bloat of COFF symbols by default.
558 #LINK_DBG = $(LINK_DBG) -debugtype:both
559 .IF "$(WIN64)" == "define"
560 # enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
564 # -O1 yields smaller code, which turns out to be faster than -O2 on x86
570 .IF "$(WIN64)" == "define"
571 DEFINES += -DWIN64 -DCONSERVATIVE
572 OPTIMIZE += -Wp64 -fp:precise
575 # For now, silence VC++ 8.x's and 9.x's warnings about "unsafe" CRT functions
576 # and POSIX CRT function names being deprecated.
577 .IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE" || \
578 "$(CCTYPE)" == "MSVC90" || "$(CCTYPE)" == "MSVC90FREE"
579 DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
582 # Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using
583 # VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
584 # do not require the fix.
585 .IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60"
586 .IF "$(USE_PERLCRT)" != "define"
587 BUILDOPT += -DPERL_MSVCRT_READFIX
591 LIBBASEFILES = $(CRYPT_LIB) \
592 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
593 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
594 netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
595 version.lib odbc32.lib odbccp32.lib
597 # The 64 bit Platform SDK compilers contain a runtime library that doesn't
598 # include the buffer overrun verification code used by the /GS switch.
599 # Since the code links against libraries that are compiled with /GS, this
600 # "security cookie verification" must be included via bufferoverlow.lib.
601 .IF "$(WIN64)" == "define"
602 LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
605 # we add LIBC here, since we may be using PerlCRT.dll
606 LIBFILES = $(LIBBASEFILES) $(LIBC)
608 EXTRACFLAGS = -nologo -GF -W3
609 CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
610 $(PCHFLAGS) $(OPTIMIZE)
611 LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
612 -libpath:"$(INST_COREDIR)" \
613 -machine:$(PROCESSOR_ARCHITECTURE)
621 CFLAGS_O = $(CFLAGS) $(BUILDOPT)
623 # used to allow local linking flags that are not propogated into Config.pm,
627 BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS)
629 #################### do not edit below this line #######################
630 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
632 # Some old dmakes (including Sarathy's one at
633 # http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
634 # don't support logical OR (||) or logical AND (&&) in conditional
635 # expressions and hence don't process this makefile correctly. Determine
636 # whether this is the case so that we can give the user an error message.
653 .SUFFIXES : .c .i $(o) .dll $(a) .exe .rc .res
656 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
659 $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS_O) -E $< >$@
665 .IF "$(CCTYPE)" == "BORLAND"
666 $(LINK32) -Tpd -ap $(BLINK_FLAGS) c0d32$(o) $<,$@,,$(LIBFILES),$(*B).def
667 $(IMPLIB) $(*B).lib $@
668 .ELIF "$(CCTYPE)" == "GCC"
669 $(LINK32) -o $@ $(BLINK_FLAGS) $< $(LIBFILES)
670 $(IMPLIB) --input-def $(*B).def --output-lib $(*B).a $@
672 $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
673 -out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
678 .IF "$(CCTYPE)" == "GCC"
679 $(RSC) --use-temp-file --include-dir=. --include-dir=.. -O COFF -i $< -o $@
686 MINIPERL = ..\miniperl.exe
688 PERLEXE = ..\perl.exe
689 WPERLEXE = ..\wperl.exe
690 PERLEXESTATIC = ..\perl-static.exe
691 GLOBEXE = ..\perlglob.exe
692 CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
693 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
695 GENUUDMAP = ..\generate_uudmap.exe
696 .IF "$(BUILD_STATIC)" == "define"
702 # Unicode data files generated by mktables
703 UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
704 ..\lib\unicore\Properties ..\lib\unicore\Decomposition.pl \
705 ..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
706 ..\lib\unicore\PVA.pl
708 # Directories of Unicode data files generated by mktables
709 UNIDATADIR1 = ..\lib\unicore\To
710 UNIDATADIR2 = ..\lib\unicore\lib
712 PERLEXE_ICO = .\perlexe.ico
713 PERLEXE_RES = .\perlexe.res
716 # Nominate a target which causes extensions to be re-built
717 # This used to be $(PERLEXE), but at worst it is the .dll that they depend
718 # on and really only the interface - i.e. the .def file used to export symbols
720 PERLDEP = perldll.def
723 PL2BAT = bin\pl2bat.pl
724 GLOBBAT = bin\perlglob.bat
740 ..\utils\config_data \
747 ..\utils\cpanp-run-perl \
769 .IF "$(CCTYPE)" == "BORLAND"
771 CFGSH_TMPL = config.bc
772 CFGH_TMPL = config_H.bc
774 .ELIF "$(CCTYPE)" == "GCC"
776 CFGSH_TMPL = config.gc
777 CFGH_TMPL = config_H.gc
778 PERLIMPLIB = ..\libperl59$(a)
779 PERLSTATICLIB = ..\libperl59s$(a)
783 .IF "$(WIN64)" == "define"
784 CFGSH_TMPL = config.vc64
785 CFGH_TMPL = config_H.vc64
787 CFGSH_TMPL = config.vc
788 CFGH_TMPL = config_H.vc
793 # makedef.pl must be updated if this changes, and this should normally
794 # only change when there is an incompatible revision of the public API.
795 PERLIMPLIB *= ..\perl59$(a)
796 PERLSTATICLIB *= ..\perl59s$(a)
797 PERLDLL = ..\perl59.dll
799 XCOPY = xcopy /f /r /i /d /y
800 RCOPY = xcopy /f /r /i /e /d /y
804 # filenames given to xsubpp must have forward slashes (since it puts
805 # full pathnames in #line strings)
806 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
847 EXTRACORE_SRC += perllib.c
849 .IF "$(PERL_MALLOC)" == "define"
850 EXTRACORE_SRC += ..\malloc.c
853 EXTRACORE_SRC += ..\perlio.c
860 # We need this for miniperl build unless we override canned
861 # config.h #define building mini\*
862 #.IF "$(USE_PERLIO)" == "define"
863 WIN32_SRC += .\win32io.c
866 .IF "$(CRYPT_SRC)" != ""
867 WIN32_SRC += .\$(CRYPT_SRC)
870 DLL_SRC = $(DYNALOADER).c
916 .\include\sys\socket.h \
919 CORE_H = $(CORE_NOCFG_H) .\config.h
921 UUDMAP_H = ..\uudmap.h
923 MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
924 CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
925 WIN32_OBJ = $(WIN32_SRC:db:+$(o))
926 MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
927 MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
928 MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
929 DLL_OBJ = $(DLL_SRC:db:+$(o))
930 X2P_OBJ = $(X2P_SRC:db:+$(o))
931 GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
933 PERLDLL_OBJ = $(CORE_OBJ)
934 PERLEXE_OBJ = perlmain$(o)
935 PERLEXEST_OBJ = perlmainst$(o)
937 PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
939 .IF "$(USE_SETARGV)" != ""
940 SETARGV_OBJ = setargv$(o)
943 # specify static extensions here
944 #STATIC_EXT = Cwd Compress/Raw/Zlib
945 STATIC_EXT = Win32CORE
947 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
949 # vars must be separated by "\t+~\t+", since we're using the tempfile
950 # version of config_sh.pl (we were overflowing someone's buffer by
951 # trying to fit them all on the command line)
954 INST_DRV=$(INST_DRV) ~ \
955 INST_TOP=$(INST_TOP) ~ \
956 INST_VER=$(INST_VER) ~ \
957 INST_ARCH=$(INST_ARCH) ~ \
958 archname=$(ARCHNAME) ~ \
961 ccflags=$(EXTRACFLAGS) $(OPTIMIZE) $(DEFINES) $(BUILDOPT) ~ \
962 cf_email=$(EMAIL) ~ \
963 d_crypt=$(D_CRYPT) ~ \
964 d_mymalloc=$(PERL_MALLOC) ~ \
965 libs=$(LIBFILES:f) ~ \
966 incpath=$(CCINCDIR) ~ \
967 libperl=$(PERLIMPLIB:f) ~ \
968 libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
975 static_ext=$(STATIC_EXT) ~ \
976 usethreads=$(USE_ITHREADS) ~ \
977 useithreads=$(USE_ITHREADS) ~ \
978 usemultiplicity=$(USE_MULTI) ~ \
979 useperlio=$(USE_PERLIO) ~ \
980 uselargefiles=$(USE_LARGE_FILES) ~ \
981 usesitecustomize=$(USE_SITECUST) ~ \
982 LINK_FLAGS=$(LINK_FLAGS) ~ \
986 # set up targets varying between Win95 and WinNT builds
989 .IF "$(IS_WIN95)" == "define"
991 RIGHTMAKE = __switch_makefiles
997 .IMPORT .IGNORE : SystemRoot windir
999 # Don't just .IMPORT OS from the environment because dmake sets OS itself.
1000 ENV_OS=$(subst,OS=, $(shell @set OS))
1002 .IF "$(ENV_OS)" == "Windows_NT"
1003 ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll
1005 ODBCCP32_DLL = $(windir)\system\odbccp32.dll
1012 all : CHECKDMAKE .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1013 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1014 $(X2P) MakePPPort Extensions $(PERLSTATIC)
1016 ..\regnodes.h : ..\regcomp.sym ..\regcomp.pl ..\regexp.h
1017 cd .. && regcomp.pl && cd win32
1019 ..\regcharclass.h : ..\Porting\regcharclass.pl
1020 cd .. && Porting\regcharclass.pl && cd win32
1022 regnodes : ..\regnodes.h
1024 ..\regcomp$(o) : ..\regnodes.h ..\regcharclass.h
1026 ..\regexec$(o) : ..\regnodes.h ..\regcharclass.h
1028 reonly : regnodes .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
1029 $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
1030 $(X2P) Extensions_reonly
1032 $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
1034 static: $(PERLEXESTATIC)
1036 #----------------------------------------------------------------
1038 #-------------------- BEGIN Win95 SPECIFIC ----------------------
1040 # this target is a jump-off point for Win95
1041 # 1. it switches to the Win95-specific makefile if it exists
1042 # (__do_switch_makefiles)
1043 # 2. it prints a message when the Win95-specific one finishes (__done)
1044 # 3. it then kills this makefile by trying to make __no_such_target
1046 __switch_makefiles: __do_switch_makefiles __done __no_such_target
1048 __do_switch_makefiles:
1049 .IF "$(NOTFIRST)" != "true"
1050 if exist $(MK2) $(MAKE:s/-S//) -f $(MK2) $(MAKETARGETS) NOTFIRST=true
1055 .IF "$(NOTFIRST)" != "true"
1057 @echo Build process complete. Ignore any errors after this message.
1058 @echo Run "dmake test" to test and "dmake install" to install
1061 # dummy targets for Win95-specific makefile
1071 # This target is used to generate the new makefile (.\makefile.95) for Win95
1073 .\makefile.95: .\makefile.mk
1074 $(MINIPERL) genmk95.pl makefile.mk $(MK2)
1076 #--------------------- END Win95 SPECIFIC ---------------------
1078 # a blank target for when builds don't need to do certain things
1079 # this target added for Win95 port but used to keep the WinNT port able to
1085 .IF "$(NEWDMAKE)" == "define"
1088 @echo Your dmake doesn't support ^|^| or ^&^& in conditional expressions.
1089 @echo Please get the latest dmake from http://search.cpan.org/dist/dmake/
1093 $(GLOBEXE) : perlglob$(o)
1094 .IF "$(CCTYPE)" == "BORLAND"
1095 $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
1096 $(LINK32) -Tpe -ap $(BLINK_FLAGS) c0x32$(o) perlglob$(o) \
1097 "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
1098 .ELIF "$(CCTYPE)" == "GCC"
1099 $(LINK32) $(BLINK_FLAGS) -mconsole -o $@ perlglob$(o) $(LIBFILES)
1101 $(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
1102 perlglob$(o) setargv$(o)
1106 perlglob$(o) : perlglob.c
1108 config.w32 : $(CFGSH_TMPL)
1109 copy $(CFGSH_TMPL) config.w32
1111 .\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
1113 copy $(CFGH_TMPL) config.h
1115 ..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
1116 $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
1117 $(mktmp $(CFG_VARS)) config.w32 > ..\config.sh
1119 # this target is for when changes to the main config.sh happen
1120 # edit config.{b,v,g}c and make this target once for each supported
1121 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
1123 perl config_sh.PL --cfgsh-option-file $(mktmp $(CFG_VARS)) \
1124 $(CFGSH_TMPL) > ..\config.sh
1125 -cd .. && del /f perl.exe
1126 -cd .. && del /f perl*.dll
1127 cd .. && perl configpm
1128 -del /f $(CFGH_TMPL)
1130 -perl config_h.PL "INST_VER=$(INST_VER)"
1131 rename config.h $(CFGH_TMPL)
1133 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
1134 cd .. && miniperl configpm
1135 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
1136 $(XCOPY) ..\*.h $(COREDIR)\*.*
1137 $(XCOPY) *.h $(COREDIR)\*.*
1138 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
1139 $(RCOPY) include $(COREDIR)\*.*
1140 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
1141 || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
1143 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
1144 .IF "$(CCTYPE)" == "BORLAND"
1145 if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \
1146 cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL)
1147 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1148 @$(mktmp c0x32$(o) $(MINI_OBJ),$@,,$(LIBFILES),)
1149 .ELIF "$(CCTYPE)" == "GCC"
1150 $(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
1151 $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
1153 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1154 @$(mktmp $(LIBFILES) $(MINI_OBJ))
1159 if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
1161 $(MINICORE_OBJ) : $(CORE_NOCFG_H)
1162 $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*B).c
1164 $(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
1165 $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
1167 # -DPERL_IMPLICIT_SYS needs C++ for perllib.c
1168 # rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
1169 # unless the .IF is true), so instead we use a .ELSE with the default.
1170 # This is the only file that depends on perlhost.h, vmem.h, and vdir.h
1172 perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
1173 .IF "$(USE_IMP_SYS)" == "define"
1174 $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
1176 $(CC) -c -I. $(CFLAGS_O) $(OBJOUT_FLAG)$@ perllib.c
1179 # 1. we don't want to rebuild miniperl.exe when config.h changes
1180 # 2. we don't want to rebuild miniperl.exe with non-default config.h
1181 $(MINI_OBJ) : $(CORE_NOCFG_H)
1183 $(WIN32_OBJ) : $(CORE_H)
1185 $(CORE_OBJ) : $(CORE_H)
1187 $(DLL_OBJ) : $(CORE_H)
1189 $(X2P_OBJ) : $(CORE_H)
1191 perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1192 $(MINIPERL) -I..\lib buildext.pl --create-perllibst-h
1193 $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) \
1194 $(BUILDOPT) CCTYPE=$(CCTYPE) > perldll.def
1196 $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
1197 .IF "$(CCTYPE)" == "BORLAND"
1198 $(LINK32) -Tpd -ap $(BLINK_FLAGS) \
1199 @$(mktmp c0d32$(o) $(PERLDLL_OBJ),$@,, \
1200 $(shell @type Extensions_static) $(LIBFILES),perldll.def)
1202 .ELIF "$(CCTYPE)" == "GCC"
1203 $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
1204 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1205 $(shell @type Extensions_static) \
1206 $(LIBFILES) $(LKPOST))
1207 dlltool --output-lib $(PERLIMPLIB) \
1208 --dllname $(PERLDLL:b).dll \
1210 --base-file perl.base \
1211 --output-exp perl.exp
1212 $(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
1213 $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
1214 $(shell @type Extensions_static) \
1215 $(LIBFILES) perl.exp $(LKPOST))
1217 $(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
1218 @Extensions_static \
1219 @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
1220 $(PERLDLL_RES) $(PERLDLL_OBJ))
1223 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1225 $(PERLSTATICLIB): Extensions_static
1226 .IF "$(CCTYPE)" == "BORLAND"
1227 $(LIB32) $(LIB_FLAGS) $@ \
1228 @$(mktmp $(shell @type Extensions_static) \
1230 .ELIF "$(CCTYPE)" == "GCC"
1231 # XXX: It would be nice if MinGW's ar accepted a temporary file, but this
1232 # doesn't seem to work:
1233 # $(LIB32) $(LIB_FLAGS) $@ \
1234 # $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1235 # $(PERLDLL_OBJ) $(LKPOST))
1236 $(LIB32) $(LIB_FLAGS) $@ \
1237 $(shell @type Extensions_static) \
1240 $(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
1241 @$(mktmp $(PERLDLL_OBJ))
1243 $(XCOPY) $(PERLSTATICLIB) $(COREDIR)
1245 $(PERLEXE_ICO): $(MINIPERL) ..\uupacktool.pl $(PERLEXE_ICO).packd
1246 $(MINIPERL) -I..\lib ..\uupacktool.pl -u $(PERLEXE_ICO).packd $(PERLEXE_ICO)
1248 $(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO)
1250 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
1251 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
1253 ..\x2p\a2p$(o) : ..\x2p\a2p.c
1254 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
1256 ..\x2p\hash$(o) : ..\x2p\hash.c
1257 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
1259 ..\x2p\str$(o) : ..\x2p\str.c
1260 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
1262 ..\x2p\util$(o) : ..\x2p\util.c
1263 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
1265 ..\x2p\walk$(o) : ..\x2p\walk.c
1266 $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
1268 $(X2P) : $(MINIPERL) $(X2P_OBJ)
1269 $(MINIPERL) ..\x2p\find2perl.PL
1270 $(MINIPERL) ..\x2p\s2p.PL
1271 .IF "$(CCTYPE)" == "BORLAND"
1272 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1273 @$(mktmp c0x32$(o) $(X2P_OBJ),$@,,$(LIBFILES),)
1274 .ELIF "$(CCTYPE)" == "GCC"
1275 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1276 $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
1278 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1279 @$(mktmp $(LIBFILES) $(X2P_OBJ))
1283 $(MINIDIR)\globals$(o) : $(UUDMAP_H)
1285 $(UUDMAP_H) : $(GENUUDMAP)
1286 $(GENUUDMAP) >$(UUDMAP_H)
1288 $(GENUUDMAP) : $(GENUUDMAP_OBJ)
1289 .IF "$(CCTYPE)" == "BORLAND"
1290 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1291 @$(mktmp c0x32$(o) $(GENUUDMAP_OBJ),$@,,$(LIBFILES),)
1292 .ELIF "$(CCTYPE)" == "GCC"
1293 $(LINK32) -v -o $@ $(BLINK_FLAGS) \
1294 $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
1296 $(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
1297 @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
1301 perlmain.c : runperl.c
1302 copy runperl.c perlmain.c
1304 perlmain$(o) : perlmain.c
1305 $(CC) $(CFLAGS_O:s,-DPERLDLL,-UPERLDLL,) $(OBJOUT_FLAG)$@ -c perlmain.c
1307 perlmainst.c : runperl.c
1308 copy runperl.c perlmainst.c
1310 perlmainst$(o) : perlmainst.c
1311 $(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
1313 $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
1314 .IF "$(CCTYPE)" == "BORLAND"
1315 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1316 @$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \
1317 $(PERLIMPLIB) $(LIBFILES),,$(PERLEXE_RES))
1318 .ELIF "$(CCTYPE)" == "GCC"
1319 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1320 $(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
1322 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1323 $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
1326 copy $(PERLEXE) $(WPERLEXE)
1327 $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
1328 copy splittree.pl ..
1329 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1331 $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
1332 .IF "$(CCTYPE)" == "BORLAND"
1333 $(LINK32) -Tpe -ap $(BLINK_FLAGS) \
1334 @$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \
1335 $(shell @type Extensions_static) $(PERLSTATICLIB) $(LIBFILES),, \
1337 .ELIF "$(CCTYPE)" == "GCC"
1338 $(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
1339 $(mktmp $(LKPRE) $(shell @type Extensions_static) \
1340 $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \
1341 $(PERLEXE_RES) $(LKPOST))
1343 $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
1344 @Extensions_static $(PERLSTATICLIB) \
1345 $(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
1349 $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
1350 if not exist $(AUTODIR) mkdir $(AUTODIR)
1351 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1352 cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1353 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1354 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1355 cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
1356 $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
1358 $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
1359 copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
1361 MakePPPort: $(MINIPERL) $(CONFIGPM)
1362 $(MINIPERL) -I..\lib ..\mkppport
1365 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean
1367 #-------------------------------------------------------------------------------
1368 Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
1369 $(XCOPY) ..\*.h $(COREDIR)\*.*
1370 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic
1371 -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic
1373 Extensions_reonly : buildext.pl $(PERLDEP) $(CONFIGPM)
1374 $(XCOPY) ..\*.h $(COREDIR)\*.*
1375 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re
1376 -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re
1378 Extensions_static : buildext.pl $(PERLDEP) $(CONFIGPM)
1379 $(XCOPY) ..\*.h $(COREDIR)\*.*
1380 $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static
1381 -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static
1382 $(MINIPERL) -I..\lib buildext.pl --list-static-libs > Extensions_static
1385 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
1386 -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
1388 Extensions_realclean :
1389 -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean
1390 -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext realclean
1392 #-------------------------------------------------------------------------------
1396 $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
1397 --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
1398 --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
1400 # Note that this next section is parsed (and regenerated) by pod/buildtoc
1401 # so please check that script before making structural changes here
1402 utils: $(PERLEXE) $(X2P)
1403 cd ..\utils && $(MAKE) PERL=$(MINIPERL)
1404 copy ..\vms\perlvms.pod ..\pod\perlvms.pod
1405 copy ..\README.aix ..\pod\perlaix.pod
1406 copy ..\README.amiga ..\pod\perlamiga.pod
1407 copy ..\README.apollo ..\pod\perlapollo.pod
1408 copy ..\README.beos ..\pod\perlbeos.pod
1409 copy ..\README.bs2000 ..\pod\perlbs2000.pod
1410 copy ..\README.ce ..\pod\perlce.pod
1411 copy ..\README.cn ..\pod\perlcn.pod
1412 copy ..\README.cygwin ..\pod\perlcygwin.pod
1413 copy ..\README.dgux ..\pod\perldgux.pod
1414 copy ..\README.dos ..\pod\perldos.pod
1415 copy ..\README.epoc ..\pod\perlepoc.pod
1416 copy ..\README.freebsd ..\pod\perlfreebsd.pod
1417 copy ..\README.hpux ..\pod\perlhpux.pod
1418 copy ..\README.hurd ..\pod\perlhurd.pod
1419 copy ..\README.irix ..\pod\perlirix.pod
1420 copy ..\README.jp ..\pod\perljp.pod
1421 copy ..\README.ko ..\pod\perlko.pod
1422 copy ..\README.linux ..\pod\perllinux.pod
1423 copy ..\README.machten ..\pod\perlmachten.pod
1424 copy ..\README.macos ..\pod\perlmacos.pod
1425 copy ..\README.macosx ..\pod\perlmacosx.pod
1426 copy ..\README.mint ..\pod\perlmint.pod
1427 copy ..\README.mpeix ..\pod\perlmpeix.pod
1428 copy ..\README.netware ..\pod\perlnetware.pod
1429 copy ..\README.openbsd ..\pod\perlopenbsd.pod
1430 copy ..\README.os2 ..\pod\perlos2.pod
1431 copy ..\README.os390 ..\pod\perlos390.pod
1432 copy ..\README.os400 ..\pod\perlos400.pod
1433 copy ..\README.plan9 ..\pod\perlplan9.pod
1434 copy ..\README.qnx ..\pod\perlqnx.pod
1435 copy ..\README.riscos ..\pod\perlriscos.pod
1436 copy ..\README.solaris ..\pod\perlsolaris.pod
1437 copy ..\README.symbian ..\pod\perlsymbian.pod
1438 copy ..\README.tru64 ..\pod\perltru64.pod
1439 copy ..\README.tw ..\pod\perltw.pod
1440 copy ..\README.uts ..\pod\perluts.pod
1441 copy ..\README.vmesa ..\pod\perlvmesa.pod
1442 copy ..\README.vms ..\pod\perlvms.pod
1443 copy ..\README.vos ..\pod\perlvos.pod
1444 copy ..\README.win32 ..\pod\perlwin32.pod
1445 copy ..\pod\perl595delta.pod ..\pod\perldelta.pod
1446 cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
1447 cd ..\lib && $(PERLEXE) lib_pm.PL
1448 $(PERLEXE) $(PL2BAT) $(UTILS)
1450 # Note that the pod cleanup in this next section is parsed (and regenerated
1451 # by pod/buildtoc so please check that script before making changes here
1453 distclean: realclean
1454 -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
1455 $(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) \
1456 $(PERLEXESTATIC) $(PERLSTATICLIB)
1458 -del /f $(DYNALOADER).c
1459 -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
1460 -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
1461 -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
1462 -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
1463 -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
1464 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1465 -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm
1466 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1467 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1468 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1469 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1470 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1471 -del /f $(LIBDIR)\Devel\PPPort.pm
1472 -del /f $(LIBDIR)\File\Glob.pm
1473 -del /f $(LIBDIR)\Storable.pm
1474 -del /f $(LIBDIR)\Digest\MD5.pm
1475 -del /f $(LIBDIR)\Digest\SHA.pm
1476 -del /f $(LIBDIR)\PerlIO\encoding.pm
1477 -del /f $(LIBDIR)\PerlIO\scalar.pm
1478 -del /f $(LIBDIR)\PerlIO\via.pm
1479 -del /f $(LIBDIR)\Sys\Hostname.pm
1480 -del /f $(LIBDIR)\threads\shared.pm
1481 -del /f $(LIBDIR)\Time\HiRes.pm
1482 -del /f $(LIBDIR)\Unicode\Normalize.pm
1483 -del /f $(LIBDIR)\Math\BigInt\FastCalc.pm
1484 -del /f $(LIBDIR)\Win32.pm
1485 -del /f $(LIBDIR)\Win32CORE.pm
1486 -del /f $(LIBDIR)\Win32API\File.pm
1487 -del /f $(LIBDIR)\Win32API\File\cFile.pc
1488 -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
1489 -if exist $(LIBDIR)\Compress rmdir /s /q $(LIBDIR)\Compress
1490 -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
1491 -if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
1492 -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
1493 -if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
1494 -if exist $(LIBDIR)\IO\Compress rmdir /s /q $(LIBDIR)\IO\Compress
1495 -if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
1496 -if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress
1497 -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
1498 -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
1499 -if exist $(LIBDIR)\re rmdir /s /q $(LIBDIR)\re
1500 -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
1501 -if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
1502 -if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
1503 -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
1504 -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
1505 -cd $(PODDIR) && del /f *.html *.bat checkpods \
1506 perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
1507 perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
1508 perldelta.pod perldgux.pod perldos.pod perlepoc.pod \
1509 perlfreebsd.pod perlhpux.pod perlhurd.pod perlirix.pod \
1510 perljp.pod perlko.pod perllinux.pod perlmachten.pod \
1511 perlmacos.pod perlmacosx.pod perlmint.pod perlmpeix.pod \
1512 perlnetware.pod perlopenbsd.pod perlos2.pod perlos390.pod \
1513 perlos400.pod perlplan9.pod perlqnx.pod perlriscos.pod \
1514 perlsolaris.pod perlsymbian.pod perltru64.pod perltw.pod \
1515 perluts.pod perlvmesa.pod perlvms.pod perlvms.pod perlvos.pod \
1517 pod2html pod2latex pod2man pod2text pod2usage \
1518 podchecker podselect
1519 -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs \
1520 perldoc perlivp dprofpp libnetcfg enc2xs piconv cpan *.bat \
1521 xsubpp instmodsh prove ptar ptardiff cpanp-run-perl cpanp cpan2dist shasum corelist config_data
1522 -cd ..\x2p && del /f find2perl s2p psed *.bat
1523 -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new \
1528 -del /f $(PERLEXE_ICO) perl.base
1529 -cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists pm_to_blib
1530 -cd $(EXTDIR) && del /s *.def Makefile Makefile.old
1531 -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
1532 -if exist $(COREDIR) rmdir /s /q $(COREDIR)
1533 -if exist pod2htmd.tmp del pod2htmd.tmp
1534 -if exist pod2htmi.tmp del pod2htmi.tmp
1535 -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
1537 install : all installbare installhtml
1539 installbare : $(RIGHTMAKE) utils
1540 $(PERLEXE) ..\installperl
1541 if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
1542 if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
1543 $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
1544 if exist ..\perl*.pdb $(XCOPY) ..\perl*.pdb $(INST_BIN)\*.*
1545 if exist ..\x2p\a2p.pdb $(XCOPY) ..\x2p\a2p.pdb $(INST_BIN)\*.*
1546 $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
1549 $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
1551 inst_lib : $(CONFIGPM)
1552 copy splittree.pl ..
1553 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1554 $(RCOPY) ..\lib $(INST_LIB)\*.*
1556 $(UNIDATAFILES) .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables
1557 cd ..\lib\unicore && \
1558 ..\$(MINIPERL) -I.. mktables
1560 minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
1561 $(XCOPY) $(MINIPERL) ..\t\$(NULL)
1562 if exist ..\t\perl.exe del /f ..\t\perl.exe
1563 rename ..\t\miniperl.exe perl.exe
1564 .IF "$(CCTYPE)" == "BORLAND"
1565 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1567 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1571 $(MINIPERL) -I..\lib harness base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
1574 $(MINIPERL) -I..\lib ..\uupacktool.pl -u -d .. -m
1576 cleanup_unpacked_files:
1577 -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\uupacktool.pl -c -d .. -m
1579 test-prep : all utils unpack_files
1580 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1581 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1582 .IF "$(CCTYPE)" == "BORLAND"
1583 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1585 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1588 test : $(RIGHTMAKE) test-prep
1589 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1591 test-reonly : reonly utils
1592 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1593 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1594 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1596 $(PERLEXE) -I..\lib harness $(OPT) -re \bpat\b \breg \bre\b \bsubst \brxcode $(EXTRA) && \
1600 cd .. && regen.pl && cd win32
1602 test-notty : test-prep
1603 set PERL_SKIP_TTY_TEST=1 && \
1604 cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1606 _test : $(RIGHTMAKE)
1607 $(XCOPY) $(PERLEXE) ..\t\$(NULL)
1608 $(XCOPY) $(PERLDLL) ..\t\$(NULL)
1609 .IF "$(CCTYPE)" == "BORLAND"
1610 $(XCOPY) $(GLOBBAT) ..\t\$(NULL)
1612 $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
1614 cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
1617 -@erase miniperlmain$(o)
1619 -@erase perlglob$(o)
1620 -@erase perlmain$(o)
1621 -@erase perlmainst$(o)
1627 -@erase $(PERLEXESTATIC)
1628 -@erase $(PERLSTATICLIB)
1631 -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(UUDMAP_H)
1632 -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
1633 -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
1634 -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
1635 -@erase $(UNIDATAFILES)
1636 -@erase $(WIN32_OBJ)
1639 -@erase ..\*$(o) ..\*$(a) ..\*.exp *$(o) *$(a) *.exp *.res
1640 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1641 -@erase ..\x2p\*.exe ..\x2p\*.bat
1645 -@erase Extensions_static
1649 _preclean : cleanup_unpacked_files
1651 clean : _preclean Extensions_clean _clean
1653 realclean : _preclean Extensions_realclean MakePPPort_clean _clean
1655 # Handy way to run perlbug -ok without having to install and run the
1656 # installed perlbug. We don't re-run the tests here - we trust the user.
1657 # Please *don't* use this unless all tests pass.
1658 # If you want to report test failures, use "dmake nok" instead.
1660 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
1663 $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
1666 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
1669 $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok