# Makefile to build perl on Windows NT using Microsoft NMAKE.
#
# This is set up to build a perl.exe that runs off a shared library
-# (perl.dll). Also makes individual DLLs for the XS extensions.
+# (perl56.dll). Also makes individual DLLs for the XS extensions.
#
##
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER = \5.5.640
+INST_VER = \5.6.0
#
# Comment this out if you DON'T want your perl installation to have
#USE_MULTI = define
#
-# XXX WARNING! This option is still very experimental. May be broken.
-#
# Beginnings of interpreter cloning/threads; still very incomplete.
# This should be enabled to get the fork() emulation. This needs
# USE_MULTI as well.
#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
#
-# This should normally be disabled. Enabling it runs a cloned toplevel
-# interpreter (*EXPERIMENTAL*, fails tests)
-#BUILDOPT = $(BUILDOPT) -DTOP_CLONE
-
-#
# specify semicolon-separated list of extra directories that modules will
# look for libraries (spaces in path names need not be quoted)
#
# VC 6.0 can load the socket dll on demand. Makes the test suite
# run in about 10% less time.
-DELAYLOAD = -DELAYLOAD:wsock32.dll delayimp.lib
+DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
# VC 6.0 seems capable of compiling perl correctly with optimizations
# enabled. Anything earlier fails tests.
# Options
#
-RUNTIME = -MD
INCLUDES = -I$(COREDIR) -I.\include -I. -I..
#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
CXX_FLAG = -TP -GX
!IF "$(USE_PERLCRT)" != "define"
-! IF "$(CFG)" == "Debug"
-PERLCRTLIBC = msvcrtd.lib
-! ELSE
-PERLCRTLIBC = msvcrt.lib
-! ENDIF
+LIBC = msvcrt.lib
!ELSE
-! IF "$(CFG)" == "Debug"
-PERLCRTLIBC = PerlCRTD.lib
-! ELSE
-PERLCRTLIBC = PerlCRT.lib
-! ENDIF
+LIBC = PerlCRT.lib
!ENDIF
PERLEXE_RES =
PERLDLL_RES =
-!IF "$(RUNTIME)" == "-MD"
-LIBC = $(PERLCRTLIBC)
-!ELSE
-LIBC = libcmt.lib
-!ENDIF
-
!IF "$(CFG)" == "Debug"
! IF "$(CCTYPE)" == "MSVC20"
-OPTIMIZE = -Od $(RUNTIME) -Z7 -D_DEBUG -DDEBUGGING
+OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
! ELSE
-OPTIMIZE = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
+OPTIMIZE = -Od -MD -Zi -DDEBUGGING
! ENDIF
LINK_DBG = -debug -pdb:none
!ELSE
! IF "$(CFG)" == "Optimize"
# -O1 yields smaller code, which turns out to be faster than -O2
-#OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
-OPTIMIZE = -O1 $(RUNTIME) -DNDEBUG
+#OPTIMIZE = -O2 -MD -DNDEBUG
+OPTIMIZE = -O1 -MD -DNDEBUG
! ELSE
-OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
+OPTIMIZE = -Od -MD -DNDEBUG
! ENDIF
LINK_DBG = -release
!ENDIF
BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
!ENDIF
-LIBBASEFILES = $(DELAYLOAD) $(CRYPT_LIB) \
+LIBBASEFILES = $(CRYPT_LIB) \
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
-out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
.rc.res:
- $(RSC) $<
+ $(RSC) -i.. $<
#
# various targets
..\pod\podselect \
..\x2p\find2perl \
..\x2p\s2p \
+ bin\exetype.pl \
bin\runperl.pl \
bin\pl2bat.pl \
bin\perlglob.pl \
WIN32_SRC = \
.\win32.c \
- .\win32sck.c
-
-!IF "$(USE_5005THREADS)" == "define"
-WIN32_SRC = $(WIN32_SRC) .\win32thread.c
-!ENDIF
+ .\win32sck.c \
+ .\win32thread.c
!IF "$(CRYPT_SRC)" != ""
WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
.\include\dirent.h \
.\include\netdb.h \
.\include\sys\socket.h \
- .\win32.h \
- .\perlhost.h \
- .\vdir.h \
- .\vmem.h
+ .\win32.h
CORE_H = $(CORE_NOCFG_H) .\config.h
!ENDIF
DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
- Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob
+ Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
+ Sys/Hostname
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
DPROF = $(EXTDIR)\Devel\DProf\DProf
GLOB = $(EXTDIR)\File\Glob\Glob
+HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
+HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
ERRNO_PM = $(LIBDIR)\Errno.pm
$(B).c \
$(BYTELOADER).c \
$(DPROF).c \
- $(GLOB).c
+ $(GLOB).c \
+ $(HOSTNAME).c
EXTENSION_DLL = \
$(SOCKET_DLL) \
$(THREAD_DLL) \
$(BYTELOADER_DLL) \
$(DPROF_DLL) \
- $(GLOB_DLL)
+ $(GLOB_DLL) \
+ $(HOSTNAME_DLL)
EXTENSION_PM = \
$(ERRNO_PM)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
+# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
!IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
-perllib$(o) : perllib.c
+perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
!ENDIF
CCTYPE=$(CCTYPE) > perldll.def
$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
- $(LINK32) -dll -def:perldll.def -out:$@ @<<
- $(LINK_FLAGS) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
+ $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
+ $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
<<
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
$(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
- $(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
- $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
+ $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
+ $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
copy $(PERLEXE) $(WPERLEXE)
- editbin /subsystem:windows $(WPERLEXE)
+ $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
$(MAKE)
cd ..\..\win32
+$(HOSTNAME_DLL): $(PERLEXE) $(HOSTNAME).xs
+ cd $(EXTDIR)\Sys\$(*B)
+ ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+ $(MAKE)
+ cd ..\..\..\win32
+
$(BYTELOADER_DLL): $(PERLEXE) $(BYTELOADER).xs
cd $(EXTDIR)\$(*B)
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
cd ..\utils
$(MAKE) PERL=$(MINIPERL)
cd ..\pod
+ copy ..\README.amiga .\perlamiga.pod
+ copy ..\README.cygwin .\perlcygwin.pod
+ copy ..\README.dos .\perldos.pod
+ copy ..\README.hpux .\perlhpux.pod
+ copy ..\README.machten .\perlmachten.pod
+ copy ..\README.os2 .\perlos2.pod
+ copy ..\vms\perlvms.pod .\perlvms.pod
copy ..\README.win32 .\perlwin32.pod
$(MAKE) -f ..\win32\pod.mak converters
+ cd ..\lib
+ $(PERLEXE) lib_pm.PL
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
$(PERLEXE) -I..\lib harness
cd ..\win32
+test-wide : test-prep
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+test-wide-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
clean :
-@erase miniperlmain$(o)
-@erase $(MINIPERL)
-@erase ..\x2p\*.exe ..\x2p\*.bat
-@erase *.ilk
-@erase *.pdb
+
+# Handy way to run perlbug -ok without having to install and run the
+# installed perlbug. We don't re-run the tests here - we trust the user.
+# Please *don't* use this unless all tests pass.
+# If you want to report test failures, use "nmake nok" instead.
+ok: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
+
+okfile: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
+
+nok: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
+
+nokfile: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok