This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #128438) build ppport.h instead of using a dummy file
authorTony Cook <tony@develop-help.com>
Wed, 22 Jun 2016 05:43:21 +0000 (15:43 +1000)
committerTony Cook <tony@develop-help.com>
Thu, 28 Jul 2016 04:32:57 +0000 (14:32 +1000)
The changes to parallelize win32 perl builds with dmake and gmake
assumed that ppport.h only provided macros and functions that are
already provided by the latest perl.

This turns out not to be the case, preventing the building of
a new Scalar-List-Utils with dmake and gmake.

I only briefly considered changing Scalar-List-Utils - the difference
in build systems is what lead to the failure, so properly build ppport.h
so that all Win32 builds have a full ppport.h just as POSIXish builds
do.

win32/.gitignore
win32/GNUmakefile
win32/makefile.mk

index 9719332..56dee9f 100644 (file)
@@ -6,6 +6,7 @@ bin/*.bat
 html/
 mini/
 Extensions_static
 html/
 mini/
 Extensions_static
+.coreheaders
 dlutils.c
 perllibst.h
 perlmain.c
 dlutils.c
 perllibst.h
 perlmain.c
index 45df09c..76fb57f 100644 (file)
@@ -998,9 +998,8 @@ UUDMAP_H    = ..\uudmap.h
 BITCOUNT_H     = ..\bitcount.h
 MG_DATA_H      = ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
 BITCOUNT_H     = ..\bitcount.h
 MG_DATA_H      = ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
-#a stub ppport.h must be generated so building XS modules, .c->.obj wise, will
-#work, so this target also represents creating the COREDIR and filling it
-HAVE_COREDIR   = $(COREDIR)\ppport.h
+
+HAVE_COREDIR   = .coreheaders
 
 MICROCORE_OBJ  = $(MICROCORE_SRC:.c=$(o))
 CORE_OBJ       = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
 
 MICROCORE_OBJ  = $(MICROCORE_SRC:.c=$(o))
 CORE_OBJ       = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=$(o))
@@ -1419,10 +1418,13 @@ else
        $(EMBED_EXE_MANI)
 endif
 
        $(EMBED_EXE_MANI)
 endif
 
-#This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS
-#building .c->.obj wise (linking is a different thing). This target is AKA
-#$(HAVE_COREDIR).
-$(COREDIR)\ppport.h : $(CORE_H)
+.PHONY: MakePPPort
+
+MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
+       $(MINIPERL) -I..\lib ..\mkppport
+
+# also known as $(HAVE_COREDIR)
+.coreheaders : $(CORE_H)
        $(XCOPY) *.h $(COREDIR)\\*.*
        $(RCOPY) include $(COREDIR)\\*.*
        $(XCOPY) ..\\*.h $(COREDIR)\\*.*
        $(XCOPY) *.h $(COREDIR)\\*.*
        $(RCOPY) include $(COREDIR)\\*.*
        $(XCOPY) ..\\*.h $(COREDIR)\\*.*
@@ -1461,7 +1463,7 @@ endif
 # DynaLoader.pm, so this will have to do
 
 #most of deps of this target are in DYNALOADER and therefore omitted here
 # DynaLoader.pm, so this will have to do
 
 #most of deps of this target are in DYNALOADER and therefore omitted here
-Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE)
+Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) MakePPPort
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
 Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
 Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
@@ -1470,7 +1472,7 @@ Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
 
 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
 
-Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR)
+Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
@@ -1769,6 +1771,7 @@ _clean :
        -@erase $(PERLDLL)
        -@erase $(CORE_OBJ)
        -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
        -@erase $(PERLDLL)
        -@erase $(CORE_OBJ)
        -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
+       -@erase .coreheaders
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
        -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
        -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
index 629045e..391112b 100644 (file)
@@ -985,9 +985,8 @@ UUDMAP_H    = ..\uudmap.h
 BITCOUNT_H     = ..\bitcount.h
 MG_DATA_H      = ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
 BITCOUNT_H     = ..\bitcount.h
 MG_DATA_H      = ..\mg_data.h
 GENERATED_HEADERS = $(UUDMAP_H) $(BITCOUNT_H) $(MG_DATA_H)
-#a stub ppport.h must be generated so building XS modules, .c->.obj wise, will
-#work, so this target also represents creating the COREDIR and filling it
-HAVE_COREDIR   = $(COREDIR)\ppport.h
+
+HAVE_COREDIR   = .\.coreheaders
 
 MICROCORE_OBJ  = $(MICROCORE_SRC:db:+$(o))
 CORE_OBJ       = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
 
 MICROCORE_OBJ  = $(MICROCORE_SRC:db:+$(o))
 CORE_OBJ       = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
@@ -1387,10 +1386,11 @@ $(GENUUDMAP) $(GENERATED_HEADERS) .UPDATEALL : ..\mg_raw.h
 .ENDIF
        $(GENUUDMAP) $(GENERATED_HEADERS)
 
 .ENDIF
        $(GENUUDMAP) $(GENERATED_HEADERS)
 
-#This generates a stub ppport.h & creates & fills /lib/CORE to allow for XS
-#building .c->.obj wise (linking is a different thing). This target is AKA
-#$(HAVE_COREDIR).
-$(COREDIR)\ppport.h : $(CORE_H)
+MakePPPort : $(HAVEMINIPERL) $(CONFIGPM)
+       $(MINIPERL) -I..\lib ..\mkppport
+
+# also known as $(HAVE_COREDIR)
+.\.coreheaders : $(CORE_H)
        $(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.*
        rem. > $@
 
        $(XCOPY) *.h $(COREDIR)\*.* && $(RCOPY) include $(COREDIR)\*.* && $(XCOPY) ..\*.h $(COREDIR)\*.*
        rem. > $@
 
@@ -1427,7 +1427,7 @@ $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
 # DynaLoader.pm, so this will have to do
 
 #most of deps of this target are in DYNALOADER and therefore omitted here
 # DynaLoader.pm, so this will have to do
 
 #most of deps of this target are in DYNALOADER and therefore omitted here
-Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE)
+Extensions : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) MakePPPort
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
 Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic !Unicode/Normalize
 
 Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
@@ -1436,7 +1436,7 @@ Extensions_normalize : $(PERLDEP) $(DYNALOADER) $(GLOBEXE) $(UNIDATAFILES)
 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
 
 Extensions_reonly : $(PERLDEP) $(DYNALOADER)
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --dynamic +re
 
-Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR)
+Extensions_static : ..\make_ext.pl list_static_libs.pl $(CONFIGPM) $(GLOBEXE) $(HAVE_COREDIR) MakePPPort
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
        $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(PLMAKE)" --dir=$(CPANDIR) --dir=$(DISTDIR) --dir=$(EXTDIR) --static
        $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
 
@@ -1644,7 +1644,6 @@ install : all installbare installhtml
 
 installbare : utils ..\pod\perltoc.pod
        $(PERLEXE) ..\installperl
 
 installbare : utils ..\pod\perltoc.pod
        $(PERLEXE) ..\installperl
-       attrib -r $(INST_COREDIR)\ppport.h && del $(INST_COREDIR)\ppport.h
        if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
        if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
        $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
        if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
        if exist $(PERLEXESTATIC) $(XCOPY) $(PERLEXESTATIC) $(INST_BIN)\*.*
        $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
@@ -1735,6 +1734,7 @@ _clean :
        -@erase $(PERLDLL)
        -@erase $(CORE_OBJ)
        -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
        -@erase $(PERLDLL)
        -@erase $(CORE_OBJ)
        -@erase $(GENUUDMAP) $(GENUUDMAP_OBJ) $(GENERATED_HEADERS)
+       -@erase .coreheaders
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
        -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
        -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
        -if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
        -if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)