# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER *= \5.00558
+INST_VER *= \5.00563
#
# Comment this out if you DON'T want your perl installation to have
#USE_OBJECT *= define
#
+# XXX WARNING! This option currently undergoing changes. May be broken.
+#
+# Beginnings of interpreter cloning/threads: still rather rough, fails
+# tests. This should be enabled to get the fork() emulation. Do not
+# enable unless you know what you're doing!
+#
+USE_ITHREADS *= define
+
+#
+# uncomment to enable the implicit "host" layer for all system calls
+# made by perl. This is needed and auto-enabled by USE_OBJECT above.
+#
+USE_IMP_SYS *= define
+
+#
# uncomment exactly one of the following
#
# Visual C++ 2.x
#CCTYPE *= GCC
#
+# uncomment this if you are compiling under Windows 95/98 and command.com
+# (not needed if you're running under 4DOS/NT 6.01 or later)
+#IS_WIN95 *= define
+
+#
# uncomment next line if you want debug version of perl (big,slow)
# If not enabled, we automatically try to use maximum optimization
# with all compilers that are known to have a working optimizer.
#BUILDOPT += -DPERL_POLLUTE
#
+# enable this to test the File::Glob implementation of CORE::glob
+#
+#BUILDOPT += -DPERL_INTERNAL_GLOB
+
+# Enabling this runs a cloned toplevel interpreter (fails tests)
+#BUILDOPT += -DTOP_CLONE
+
+#
# specify semicolon-separated list of extra directories that modules will
# look for libraries (spaces in path names need not be quoted)
#
PERL_MALLOC != undef
USE_THREADS != undef
USE_MULTI != undef
+USE_IMP_SYS != define
.ENDIF
PERL_MALLOC *= undef
USE_THREADS *= undef
+
+.IF "$(USE_THREADS)" == "define"
+USE_ITHREADS != undef
+.ENDIF
+
USE_MULTI *= undef
USE_OBJECT *= undef
+USE_ITHREADS *= undef
+USE_IMP_SYS *= undef
.IF "$(USE_MULTI)$(USE_THREADS)$(USE_OBJECT)" != "undefundefundef"
BUILDOPT += -DPERL_IMPLICIT_CONTEXT
.ENDIF
+.IF "$(USE_ITHREADS)" != "undef"
+BUILDOPT += -DUSE_ITHREADS
+.ENDIF
+
+.IF "$(USE_IMP_SYS)" != "undef"
+BUILDOPT += -DPERL_IMPLICIT_SYS
+.ENDIF
.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
CFG *= Optimize
.ENDIF
+ARCHDIR = ..\lib\$(ARCHNAME)
COREDIR = ..\lib\CORE
AUTODIR = ..\lib\auto
+LIBDIR = ..\lib
+EXTDIR = ..\ext
+PODDIR = ..\pod
+EXTUTILSDIR = $(LIBDIR)\ExtUtils
+
+#
+INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
+INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
+INST_LIB = $(INST_TOP)$(INST_VER)\lib
+INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
+INST_COREDIR = $(INST_ARCHLIB)\CORE
+INST_POD = $(INST_LIB)\pod
+INST_HTML = $(INST_POD)\html
#
# Programs to compile, build .lib files and link
CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
+LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
OBJOUT_FLAG = -o
EXEOUT_FLAG = -e
LIBOUT_FLAG =
SUBSYS = console
CXX_FLAG = -xc++
-LIBC = -lcrtdll
+# crtdll doesn't define _wopen and friends
+#LIBC = -lcrtdll
+LIBC = -lmsvcrt
LIBFILES = $(CRYPT_LIB) -ladvapi32 -luser32 -lnetapi32 -lwsock32 \
-lmingw32 -lgcc -lmoldname $(LIBC) -lkernel32
.IF "$(CFG)" == "Debug"
-OPTIMIZE = -g -O2 $(RUNTIME) -DDEBUGGING
+OPTIMIZE = -g $(RUNTIME) -DDEBUGGING
LINK_DBG = -g
.ELSE
OPTIMIZE = -g -O2 $(RUNTIME)
.ENDIF
CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
-LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
+LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
OBJOUT_FLAG = -o
EXEOUT_FLAG = -o
LIBOUT_FLAG =
.ELSE
-CC = cl.exe
-LINK32 = link.exe
+CC = cl
+LINK32 = link
LIB32 = $(LINK32) -lib
#
CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
+LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
+ -libpath:"$(INST_COREDIR)" \
+ -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
EXEOUT_FLAG = -Fe
LIBOUT_FLAG = /out:
.ENDIF
#
-INST_BIN = $(INST_TOP)$(INST_VER)\bin$(INST_ARCH)
-INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
-INST_LIB = $(INST_TOP)$(INST_VER)\lib
-INST_POD = $(INST_LIB)\pod
-INST_HTML = $(INST_POD)\html
-LIBDIR = ..\lib
-EXTDIR = ..\ext
-PODDIR = ..\pod
-EXTUTILSDIR = $(LIBDIR)\extutils
-
-#
# various targets
MINIPERL = ..\miniperl.exe
MINIDIR = .\mini
PERLEXE = ..\perl.exe
+WPERLEXE = ..\wperl.exe
GLOBEXE = ..\perlglob.exe
CONFIGPM = ..\lib\Config.pm
MINIMOD = ..\lib\ExtUtils\Miniperl.pm
..\utils\c2ph \
..\utils\h2xs \
..\utils\perldoc \
- ..\utils\pstruct \
..\utils\perlcc \
..\pod\checkpods \
..\pod\pod2html \
.ENDIF
.IF "$(USE_OBJECT)" == "define"
-PERLIMPLIB *= ..\perlcore$(a)
-PERLDLL = ..\perlcore.dll
+PERLIMPLIB *= ..\perl56$(a)
+PERLDLL = ..\perl56.dll
.ELSE
PERLIMPLIB *= ..\perl$(a)
PERLDLL = ..\perl.dll
..\toke.c \
..\universal.c \
..\utf8.c \
- ..\util.c
+ ..\util.c \
+ ..\xsutils.c
EXTRACORE_SRC += perllib.c
..\unixish.h \
..\utf8.h \
..\util.h \
- ..\warning.h \
+ ..\warnings.h \
..\XSUB.h \
..\EXTERN.h \
..\perlvars.h \
.\include\dirent.h \
.\include\netdb.h \
.\include\sys\socket.h \
- .\win32.h
+ .\win32.h \
+ .\perlhost.h \
+ .\vdir.h \
+ .\vmem.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
+ Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
PEEK = $(EXTDIR)\Devel\Peek\Peek
BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
DPROF = $(EXTDIR)\Devel\DProf\DProf
+GLOB = $(EXTDIR)\File\Glob\Glob
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
RE_DLL = $(AUTODIR)\re\re.dll
BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
+GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
ERRNO_PM = $(LIBDIR)\Errno.pm
$(PEEK).c \
$(B).c \
$(BYTELOADER).c \
- $(DPROF).c
+ $(DPROF).c \
+ $(GLOB).c
EXTENSION_DLL = \
$(SOCKET_DLL) \
$(RE_DLL) \
$(THREAD_DLL) \
$(BYTELOADER_DLL) \
- $(DPROF_DLL)
+ $(DPROF_DLL) \
+ $(GLOB_DLL)
EXTENSION_PM = \
$(ERRNO_PM)
# Top targets
#
+.IF "$(IS_WIN95)" != ""
+MK2 = .\makew95.mk
+
+all : .\config.h $(GLOBEXE) $(MINIMOD) $(MK2)
+all2 : $(CONFIGPM) $(PERLEXE) $(PERL95EXE) $(X2P) $(EXTENSION_DLL) \
+ $(EXTENSIOM_PM)
+.ELSE
all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
$(X2P) $(EXTENSION_DLL) $(EXTENSION_PM)
+.ENDIF
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
#------------------------------------------------------------
+# This target is used to generate the makew95.mk for Win95
+.IF "$(IS_WIN95)" != ""
+$(MK2): makefile.mk
+ $(MINIPERL) genmk95.pl makefile.mk $(MK2)
+ $(MAKE) -f $(MK2) all2
+.ENDIF
+
$(GLOBEXE) : perlglob$(o)
.IF "$(CCTYPE)" == "BORLAND"
$(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
$(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
- || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
+ || $(MAKE) $(MAKEMACROS) $(CONFIGPM) $(MAKEFILE)
$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
.IF "$(CCTYPE)" == "BORLAND"
$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
+# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
+.IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
+perllib$(o) : perllib.c
+ $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+.ENDIF
+
# 1. we don't want to rebuild miniperl.exe when config.h changes
# 2. we don't want to rebuild miniperl.exe with non-default config.h
$(MINI_OBJ) : $(CORE_NOCFG_H)
$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
$(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
dlltool --output-lib $(PERLIMPLIB) \
- --dllname perl.dll \
+ --dllname $(PERLDLL:b).dll \
--def perldll.def \
--base-file perl.base \
--output-exp perl.exp
.ELSE
$(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
$(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB)
+ copy $(PERLEXE) $(WPERLEXE)
+ editbin /subsystem:windows $(WPERLEXE)
.ENDIF
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
+ cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
+ $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
$(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
cd $(EXTDIR)\Devel\$(*B) && $(MAKE)
+$(GLOB_DLL): $(PERLEXE) $(GLOB).xs
+ cd $(EXTDIR)\File\$(*B) && \
+ ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+ cd $(EXTDIR)\File\$(*B) && $(MAKE)
+
$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
cd $(EXTDIR)\Devel\$(*B) && \
..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
-del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
-del /f $(EXTDIR)\DynaLoader\dl_win32.xs
-del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
+ -del /f $(LIBDIR)\XSLoader.pm
-del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
-del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
-del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
-del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
-del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
+ -del /f $(LIBDIR)\File\Glob.pm
-rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
-rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
-rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
- dprofpp pstruct *.bat
+ dprofpp *.bat
-cd ..\x2p && del /f find2perl s2p *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)
.IF "$(PERL95EXE)" != ""
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
.ENDIF
+ if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
-@erase /f config.h
-@erase $(GLOBEXE)
-@erase $(PERLEXE)
+ -@erase $(WPERLEXE)
-@erase $(PERLDLL)
-@erase $(CORE_OBJ)
-rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)