From: Steve Hay Date: Sun, 13 Sep 2009 02:31:59 +0000 (+0100) Subject: Fix Win32 build X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ddff1485169a2ddf8548bfc8dce819bad389a50;p=p5sagit%2Fp5-mst-13.2.git Fix Win32 build 1. Revert 7d8fed6 (rendered redundant by c3ef65f) 2. Change path to Cwd in make_ext.pl on Win32--Win32 runs make_ext.pl from the win32/ sub-directory, not from the top-level directory. 3. Likewise change path to Cwd in makefile invocations of xsubpp and splittree.pl. --- diff --git a/make_ext.pl b/make_ext.pl index e81ca51..b0be209 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -3,7 +3,7 @@ use strict; use warnings; use Config; BEGIN { - unshift @INC, 'ext/Cwd'; + unshift @INC, $^O eq 'MSWin32' ? '../ext/Cwd' : 'ext/Cwd'; } use Cwd; diff --git a/win32/Makefile b/win32/Makefile index ae8285f..66eee96 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -650,7 +650,7 @@ DEL = del # # filenames given to xsubpp must have forward slashes (since it puts # full pathnames in #line strings) -XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ +XSUBPP = ..\$(MINIPERL) -I..\..\lib -I..\Cwd ..\$(EXTUTILSDIR)\xsubpp \ -C++ -prototypes MICROCORE_SRC = \ @@ -1027,7 +1027,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) copy $(PERLEXE) $(WPERLEXE) $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) + $(MINIPERL) -I..\lib -I..\ext\Cwd ..\splittree.pl "../LIB" $(AUTODIR) $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \ @@ -1073,7 +1073,7 @@ Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static -Extensions_nonxs: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) ..\lib\lib.pm +Extensions_nonxs: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs @@ -1090,15 +1090,10 @@ doc: $(PERLEXE) ..\pod\perltoc.pod --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \ --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse -..\lib\lib.pm: $(PERLEXE) - cd ..\lib - $(PERLEXE) $(ICWD) lib_pm.PL - cd ..\win32 - # Note that this next section is parsed (and regenerated) by pod/buildtoc # so please check that script before making structural changes here -utils: $(PERLEXE) $(X2P) Extensions_nonxs +utils: $(PERLEXE) $(X2P) cd ..\utils $(MAKE) PERL=$(MINIPERL) cd ..\pod @@ -1142,6 +1137,8 @@ utils: $(PERLEXE) $(X2P) Extensions_nonxs copy ..\README.win32 ..\pod\perlwin32.pod copy ..\pod\perl5110delta.pod ..\pod\perldelta.pod $(MAKE) -f ..\win32\pod.mak converters + cd ..\lib + $(PERLEXE) $(ICWD) lib_pm.PL cd ..\win32 $(PERLEXE) $(PL2BAT) $(UTILS) $(PERLEXE) $(ICWD) ..\autodoc.pl .. @@ -1259,7 +1256,7 @@ installhtml : doc inst_lib : $(CONFIGPM) copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) + $(MINIPERL) -I..\lib -I..\ext\Cwd ..\splittree.pl "../LIB" $(AUTODIR) $(RCOPY) ..\lib $(INST_LIB)\*.* $(UNIDATAFILES) : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs diff --git a/win32/makefile.mk b/win32/makefile.mk index 2c71d6d..b96e511 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -811,7 +811,7 @@ NOOP = @rem # # filenames given to xsubpp must have forward slashes (since it puts # full pathnames in #line strings) -XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ +XSUBPP = ..\$(MINIPERL) -I..\..\lib -I..\Cwd ..\$(EXTUTILSDIR)\xsubpp \ -C++ -prototypes MICROCORE_SRC = \ @@ -1347,7 +1347,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) copy $(PERLEXE) $(WPERLEXE) $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) + $(MINIPERL) -I..\lib -I..\ext\Cwd ..\splittree.pl "../LIB" $(AUTODIR) $(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES) .IF "$(CCTYPE)" == "BORLAND" @@ -1402,7 +1402,7 @@ Extensions_static : ..\make_ext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static -Extensions_nonxs : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) ..\lib\lib.pm +Extensions_nonxs : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs @@ -1420,12 +1420,9 @@ doc: $(PERLEXE) ..\pod\perltoc.pod --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\ --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse -..\lib\lib.pm: $(PERLEXE) - cd ..\lib && $(PERLEXE) $(ICWD) lib_pm.PL - # Note that this next section is parsed (and regenerated) by pod/buildtoc # so please check that script before making structural changes here -utils: $(PERLEXE) $(X2P) Extensions_nonxs +utils: $(PERLEXE) $(X2P) cd ..\utils && $(MAKE) PERL=$(MINIPERL) copy ..\README.aix ..\pod\perlaix.pod copy ..\README.amiga ..\pod\perlamiga.pod @@ -1467,6 +1464,7 @@ utils: $(PERLEXE) $(X2P) Extensions_nonxs copy ..\README.win32 ..\pod\perlwin32.pod copy ..\pod\perl5110delta.pod ..\pod\perldelta.pod cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters + cd ..\lib && $(PERLEXE) $(ICWD) lib_pm.PL $(PERLEXE) $(PL2BAT) $(UTILS) $(PERLEXE) $(ICWD) ..\autodoc.pl .. $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q @@ -1583,7 +1581,7 @@ installhtml : doc inst_lib : $(CONFIGPM) copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) + $(MINIPERL) -I..\lib -I..\ext\Cwd ..\splittree.pl "../LIB" $(AUTODIR) $(RCOPY) ..\lib $(INST_LIB)\*.* $(UNIDATAFILES) .UPDATEALL : $(MINIPERL) $(CONFIGPM) ..\lib\unicore\mktables Extensions_nonxs