#
# 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
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)
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";
}
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{$_}) {
$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) {
base : miniperl perl
@ $(NOOP)
-extras : dynext libmods utils podxform extra.pods
+extras : dynext nonxsext libmods utils podxform extra.pods
@ $(NOOP)
libmods : $(LIBPREREQ)
@ $(NOOP)
@ 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)
#
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
$(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
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
$(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