summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-08 09:46:45 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-08 09:46:45 +0100
commita34ce875bf70f00f7af4a549f8c1ff0f4469f7fb (patch)
treefd89baa5a154b634e70b6b45710ac53eeeb95a1c
parentd1ce36d727ed53b12332c6ef40743b21335b21a1 (diff)
downloadperl-a34ce875bf70f00f7af4a549f8c1ff0f4469f7fb.tar.gz
On Win32 and VMS, split building dynamic and nonxs extensions into two targets.
-rw-r--r--make_ext.pl11
-rw-r--r--vms/descrip_mms.template7
-rw-r--r--win32/Makefile6
-rw-r--r--win32/makefile.mk6
4 files changed, 22 insertions, 8 deletions
diff --git a/make_ext.pl b/make_ext.pl
index cfc12c2971..b544830243 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 e13316825b..b65fa0c660 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 828aa82447..29e14526c6 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 40e08e5f44..1b5cff1884 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