This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update win32/config* stuff, Changes
[perl5.git] / win32 / Makefile
index 2ffcb52..d809459 100644 (file)
@@ -6,6 +6,10 @@
 #
 
 ##
+## Make sure you read README.win32 *before* you mess with anything here!
+##
+
+##
 ## Build configuration.  Edit the values below to suit your needs.
 ##
 
@@ -25,7 +29,7 @@ INST_TOP      = $(INST_DRV)\perl
 # versioned installation can be obtained by setting INST_TOP above to a
 # path that includes an arbitrary version string.
 #
-INST_VER       = \5.00552
+INST_VER       = \5.00555
 
 #
 # uncomment to enable threads-capabilities
@@ -33,6 +37,11 @@ INST_VER     = \5.00552
 #USE_THREADS   = define
 
 #
+# uncomment to enable multiple interpreters
+#
+#USE_MULTI     = define
+
+#
 # uncomment next line if you are using Visual C++ 2.x
 #
 #CCTYPE                = MSVC20
@@ -49,6 +58,15 @@ INST_VER     = \5.00552
 #CFG           = Debug
 
 #
+# uncomment next option if you want to use the VC++ compiler optimization.
+# Warning: This is known to produce incorrect code for compiler versions
+# earlier than VC++ 98 (Visual Studio 6.0). VC++ 98 generates code that
+# successfully passes the Perl regression test suite. It hasn't yet been
+# widely tested with real applications though.
+#
+#CFG           = Optimize
+
+#
 # uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
 # Highly recommended.  It has patches that fix known bugs in MSVCRT.DLL.
 # This currently requires VC 5.0 with Service Pack 3.
@@ -91,8 +109,10 @@ INST_VER    = \5.00552
 
 #
 # set the install locations of the compiler include/libraries
+# Running VCVARS32.BAT is *required* when using Visual C.
 # Some versions of Visual C don't define MSVCDIR in the environment,
-# so you may have to set CCHOME explicitly.
+# so you may have to set CCHOME explicitly (spaces in the path name should
+# not be quoted)
 #
 #CCHOME                = f:\msvc20
 CCHOME         = $(MSVCDIR)
@@ -100,7 +120,19 @@ CCINCDIR   = $(CCHOME)\include
 CCLIBDIR       = $(CCHOME)\lib
 
 #
-# specify space-separated list of extra directories to look for libraries
+# additional compiler flags can be specified here.
+#
+# Adding -DPERL_POLLUTE enables support for old symbols, at the expense of
+# extreme pollution. You most probably want this if you're compiling modules
+# from CPAN, or other such serious uses of this experimental perl release.
+# We don't enable this by default because we want the modules to get fixed
+# instead of clinging to shortcuts like this one.
+#
+#BUILDOPT      = -DPERL_POLLUTE
+
+#
+# specify semicolon-separated list of extra directories that modules will
+# look for libraries (spaces in path names need not be quoted)
 #
 EXTRALIBDIRS   =
 
@@ -126,6 +158,7 @@ CRYPT_FLAG  = -DHAVE_DES_FCRYPT
 !IF "$(OBJECT)" != ""
 PERL_MALLOC    = undef
 USE_THREADS    = undef
+USE_MULTI      = undef
 !ENDIF
 
 !IF "$(PERL_MALLOC)" == ""
@@ -136,9 +169,9 @@ PERL_MALLOC = undef
 USE_THREADS    = undef
 !ENDIF
 
-#BUILDOPT      = -DMULTIPLICITY 
-#BUILDOPT      = -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
-# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+!IF "$(USE_MULTI)" == ""
+USE_MULTI      = undef
+!ENDIF
 
 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
 PROCESSOR_ARCHITECTURE = x86
@@ -206,8 +239,8 @@ OPTIMIZE    = -Od $(RUNTIME)d -Zi -D_DEBUG -DDEBUGGING
 !  ENDIF
 LINK_DBG       = -debug -pdb:none
 !ELSE
-!  IF "$(CCTYPE)" == "MSVC20"
-OPTIMIZE       = -Od $(RUNTIME) -DNDEBUG
+!  IF  "$(CFG)" == "Optimize"
+OPTIMIZE       = -O2 $(RUNTIME) -DNDEBUG
 !  ELSE
 OPTIMIZE       = -Od $(RUNTIME) -DNDEBUG
 !  ENDIF
@@ -473,7 +506,7 @@ SETARGV_OBJ = setargv$(o)
 !ENDIF
 
 DYNAMIC_EXT    = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
-               Data/Dumper
+               Data/Dumper Devel/Peek
 STATIC_EXT     = DynaLoader
 NONXS_EXT      = Errno
 
@@ -490,6 +523,7 @@ B           = $(EXTDIR)\B\B
 RE             = $(EXTDIR)\re\re
 DUMPER         = $(EXTDIR)\Data\Dumper\Dumper
 ERRNO          = $(EXTDIR)\Errno\Errno
+PEEK           = $(EXTDIR)\Devel\Peek\Peek
 
 SOCKET_DLL     = $(AUTODIR)\Socket\Socket.dll
 FCNTL_DLL      = $(AUTODIR)\Fcntl\Fcntl.dll
@@ -501,6 +535,7 @@ ATTRS_DLL   = $(AUTODIR)\attrs\attrs.dll
 THREAD_DLL     = $(AUTODIR)\Thread\Thread.dll
 B_DLL          = $(AUTODIR)\B\B.dll
 DUMPER_DLL     = $(AUTODIR)\Data\Dumper\Dumper.dll
+PEEK_DLL       = $(AUTODIR)\Devel\Peek\Peek.dll
 RE_DLL         = $(AUTODIR)\re\re.dll
 
 ERRNO_PM       = $(LIBDIR)\Errno.pm
@@ -516,6 +551,7 @@ EXTENSION_C =               \
                $(THREAD).c     \
                $(RE).c         \
                $(DUMPER).c     \
+               $(PEEK).c       \
                $(B).c
 
 EXTENSION_DLL  =               \
@@ -527,6 +563,7 @@ EXTENSION_DLL       =               \
                $(POSIX_DLL)    \
                $(ATTRS_DLL)    \
                $(DUMPER_DLL)   \
+               $(PEEK_DLL)     \
                $(B_DLL)
 
 EXTENSION_PM   =               \
@@ -550,22 +587,23 @@ CFG_VARS  =                                       \
                "INST_VER=$(INST_VER)"                  \
                "archname=$(ARCHNAME)"                  \
                "cc=$(CC)"                              \
-               "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)"      \
+               "ccflags=$(OPTIMIZE:"=\") $(DEFINES) $(OBJECT)" \
                "cf_email=$(EMAIL)"                     \
                "d_crypt=$(D_CRYPT)"                    \
                "d_mymalloc=$(PERL_MALLOC)"             \
                "libs=$(LIBFILES)"                      \
-               "incpath=$(CCINCDIR)"                   \
-               "libperl=$(PERLIMPLIB:..\=)"                    \
-               "libpth=$(CCLIBDIR) $(EXTRALIBDIRS)"    \
+               "incpath=$(CCINCDIR:"=\")"              \
+               "libperl=$(PERLIMPLIB:..\=)"            \
+               "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")"  \
                "libc=$(LIBC)"                          \
                "make=nmake"                            \
                "static_ext=$(STATIC_EXT)"              \
                "dynamic_ext=$(DYNAMIC_EXT)"            \
                "nonxs_ext=$(NONXS_EXT)"                \
                "usethreads=$(USE_THREADS)"             \
-               "LINK_FLAGS=$(LINK_FLAGS)"              \
-               "optimize=$(OPTIMIZE)"
+               "usemultiplicity=$(USE_MULTI)"          \
+               "LINK_FLAGS=$(LINK_FLAGS:"=\")"         \
+               "optimize=$(OPTIMIZE:"=\")"
 
 #
 # Top targets
@@ -604,7 +642,7 @@ regen_config_h:
        perl configpm
        cd win32
        -del /f $(CFGH_TMPL)
-       -mkdir ..\lib\CORE
+       -mkdir $(COREDIR)
        -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
        rename config.h $(CFGH_TMPL)
 
@@ -616,7 +654,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
        $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
        $(RCOPY) include $(COREDIR)\*.*
        $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
-           || $(MAKE) $(MAKEFLAGS) $(CONFIGPM)
+           || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
 
 $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
        $(LINK32) -subsystem:console -out:$@ @<<
@@ -642,7 +680,7 @@ $(DLL_OBJ)  : $(CORE_H)
 $(PERL95_OBJ)  : $(CORE_H)
 $(X2P_OBJ)     : $(CORE_H)
 
-perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
+perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym makedef.pl
        $(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) $(OBJECT) \
            CCTYPE=$(CCTYPE) > perldll.def
 
@@ -750,6 +788,12 @@ $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
        $(MAKE)
        cd ..\..\..\win32
 
+$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
+       cd $(EXTDIR)\Devel\$(*B)
+       ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+       $(MAKE)
+       cd ..\..\..\win32
+
 $(RE_DLL): $(PERLEXE) $(RE).xs
        cd $(EXTDIR)\$(*B)
        ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
@@ -843,6 +887,7 @@ distclean: clean
        -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
+       -del /f $(LIBDIR)\Devel\Peek.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
@@ -862,7 +907,7 @@ distclean: clean
        -del /f perl95.c
        -del /f bin\*.bat
        cd $(EXTDIR)
-       -del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
+       -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
        cd ..\win32
        -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
        -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)