From: Nicholas Clark Date: Tue, 8 Sep 2009 08:46:45 +0000 (+0100) Subject: On Win32 and VMS, split building dynamic and nonxs extensions into two targets. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a34ce875bf70f00f7af4a549f8c1ff0f4469f7fb;p=p5sagit%2Fp5-mst-13.2.git On Win32 and VMS, split building dynamic and nonxs extensions into two targets. --- diff --git a/make_ext.pl b/make_ext.pl index cfc12c2..b544830 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -16,7 +16,8 @@ use Cwd; # # On Windows or VMS, # If '--static' is specified, static extensions will be built. -# If '--dynamic' is specified, dynamic (and nonxs) extensions will be built. +# If '--dynamic' is specified, dynamic extensions will be built. +# If '--nonxs' is specified, nonxs extensions will be built. # If '--all' is specified, all extensions will be built. # # make_ext.pl "MAKE=make [-make_opts]" --dir=directory [--target=target] [--static|--dynamic|--all] +ext2 !ext1 @@ -67,6 +68,7 @@ foreach (@ARGV) { my $static = $opts{static} || $opts{all}; my $dynamic = $opts{dynamic} || $opts{all}; +my $nonxs = $opts{nonxs} || $opts{all}; # The Perl Makefile.SH will expand all extensions to # lib/auto/X/X.a (or lib/auto/X/Y/Y.a if nested) @@ -126,7 +128,7 @@ if ($target eq '') { die "$0: unknown make target '$target'\n"; } -if (!@extspec and !$static and !$dynamic) { +if (!@extspec and !$static and !$dynamic and !$nonxs) { die "$0: no extension specified\n"; } @@ -157,7 +159,8 @@ if ($is_Win32) { my @ext; push @ext, FindExt::static_ext() if $static; - push @ext, FindExt::dynamic_ext(), FindExt::nonxs_ext() if $dynamic; + push @ext, FindExt::dynamic_ext() if $dynamic; + push @ext, FindExt::nonxs_ext() if $nonxs; foreach (sort @ext) { if (%incl and !exists $incl{$_}) { @@ -179,7 +182,7 @@ elsif ($is_VMS) { $perl = $^X; push @extspec, (split ' ', $Config{static_ext}) if $static; push @extspec, (split ' ', $Config{dynamic_ext}) if $dynamic; - push @extspec, (split ' ', $Config{nonxs_ext}) if $dynamic; + push @extspec, (split ' ', $Config{nonxs_ext}) if $nonxs; } foreach my $spec (@extspec) { diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index e133168..b65fa0c 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -387,7 +387,7 @@ git_version.h : $(MINIPERL_EXE) make_patchnum.pl base : miniperl perl @ $(NOOP) -extras : dynext libmods utils podxform extra.pods +extras : dynext nonxsext libmods utils podxform extra.pods @ $(NOOP) libmods : $(LIBPREREQ) @ $(NOOP) @@ -584,7 +584,10 @@ unidatafiles.ts : $(MINIPERL_EXE) [.lib]Config.pm [.lib.unicore]mktables @ Rename/Log XSLoader.pm [.ext.DynaLoader] dynext : $(LIBPREREQ) $(DBG)perlshr$(E) preplibrary makeppport $(MINIPERL_EXE) - $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--all" + $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--dynamic" "--static" + +nonxsext : $(LIBPREREQ) $(DBG)perlshr$(E) preplibrary makeppport $(MINIPERL_EXE) + $(MINIPERL) make_ext.pl "MAKE=$(MMS)" "--nonxs" [.lib]lib.pm : [.lib]lib_pm.PL $(MINIPERL) $(MMS$SOURCE) diff --git a/win32/Makefile b/win32/Makefile index 828aa82..29e1452 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -836,7 +836,7 @@ CFG_VARS = \ # all : .\config.h ..\git_version.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) \ - $(UNIDATAFILES) MakePPPort $(PERLEXE) $(X2P) Extensions $(PERLSTATIC) + $(UNIDATAFILES) MakePPPort $(PERLEXE) $(X2P) Extensions_nonxs Extensions $(PERLSTATIC) @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. ..\regcharclass.h : ..\Porting\regcharclass.pl @@ -1071,6 +1071,10 @@ 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) + $(XCOPY) ..\*.h $(COREDIR)\*.* + $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs + Extensions_clean: -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean diff --git a/win32/makefile.mk b/win32/makefile.mk index 40e08e5..1b5cff1 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1027,7 +1027,7 @@ ODBCCP32_DLL = $(windir)\system\odbccp32.dll all : CHECKDMAKE .\config.h ..\git_version.h $(GLOBEXE) $(MINIPERL) $(MK2) \ $(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) MakePPPort \ - $(PERLEXE) $(X2P) Extensions $(PERLSTATIC) + $(PERLEXE) $(X2P) Extensions Extensions_nonxs $(PERLSTATIC) ..\regcharclass.h : ..\Porting\regcharclass.pl cd .. && miniperl Porting\regcharclass.pl && cd win32 @@ -1400,6 +1400,10 @@ 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) + $(XCOPY) ..\*.h $(COREDIR)\*.* + $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs + Extensions_clean : -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean