extensions=''
known_extensions=''
static_ext=''
+nonxs_ext=''
useopcode=''
useposix=''
d_bsd=''
: If we are using the old config.sh, known_extensions may contain
: old or inaccurate or duplicate values.
known_extensions=''
+nonxs_extensions=''
: We do not use find because it might not be available.
: We do not just use MANIFEST because the user may have dropped
: some additional extensions into the source tree and expect them
else
if $test -d $xxx; then
cd $xxx
+ zzz=$known_extensions
for yyy in * ; do
if $test -f $yyy/$yyy.xs; then
known_extensions="$known_extensions $xxx/$yyy"
fi
done
cd ..
+ if $test "$zzz" = "$known_extensions"; then
+ if $test -f $xxx/Makefile.PL; then
+ known_extensions="$known_extensions $xxx"
+ nonxs_extensions="$nonxs_extensions $xxx"
+ fi
+ fi
fi
fi
;;
esac
done
+set X $nonxs_extensions
+shift
+nonxs_extensions="$*"
set X $known_extensions
shift
known_extensions="$*"
true|$define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
- *) avail_ext="$avail_ext $xxx"
+ *)
+ case " $nonxs_extensions " in
+ *" $xxx "*) ;;
+ *) avail_ext="$avail_ext $xxx" ;;
+ esac
;;
esac
done
shift
avail_ext="$*"
+: Now see which nonxs extensions are supported on this system.
+nonxs_ext=''
+for xxx in $nonxs_extensions ; do
+ case "$xxx" in
+ *) nonxs_ext="$nonxs_ext $xxx"
+ ;;
+ esac
+done
+
+set X $nonxs_ext
+shift
+nonxs_ext="$*"
+
case $usedl in
$define)
$cat <<EOM
esac
;;
esac
+ : Exclude those that are not xs extensions
case "$dflt" in
'') dflt=none;;
esac
: Exclude those already listed in dynamic linking
dflt=''
for xxx in $avail_ext; do
- case " $dynamic_ext " in
+ case " $dynamic_ext $nonxs_ext " in
*" $xxx "*) ;;
*) dflt="$dflt $xxx" ;;
esac
perl='$perl'
perladmin='$perladmin'
perlpath='$perlpath'
+nonxs_ext='$nonxs_ext'
pg='$pg'
phostname='$phostname'
pidtype='$pidtype'
ext/DynaLoader/dl_none.xs Stub implementation
ext/DynaLoader/dl_vms.xs VMS implementation
ext/DynaLoader/dlutils.c Dynamic loader utilities for dl_*.xs files
+ext/Errno/Errno_pm.PL Errno perl module create script
+ext/Errno/Makefile.PL Errno extension makefile writer
ext/Fcntl/Fcntl.pm Fcntl extension Perl module
ext/Fcntl/Fcntl.xs Fcntl extension external subroutines
ext/Fcntl/Makefile.PL Fcntl extension makefile writer
t/lib/dosglob.t See if File::DosGlob works
t/lib/english.t See if English works
t/lib/env.t See if Env works
+t/lib/errno.t See if Errno works
t/lib/filecache.t See if FileCache works
t/lib/filecopy.t See if File::Copy works
t/lib/filefind.t See if File::Find works
static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)"
done
+nonxs_list=' '
+for f in $nonxs_ext; do
+ base=`echo "$f" | sed 's/.*\///'`
+ nonxs_list="$nonxs_list ext/$f/pm_to_blib"
+done
+
echo "Extracting Makefile (with variable substitutions)"
$spitshell >Makefile <<!GROK!THIS!
# Makefile.SH
dynamic_ext = $dynamic_list
static_ext = $static_list
-ext = \$(dynamic_ext) \$(static_ext)
+nonxs_ext = $nonxs_list
+ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
libs = $libs $cryptlib
.c$(OBJ_EXT):
$(CCCMD) $(PLDLFLAGS) $*.c
-all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext)
+all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext) $(nonxs_ext)
@echo " "; echo " Everything is up to date."
compile: all
perl bytecode.pl
# Extensions:
-# Names added to $(dynamic_ext) or $(static_ext) will automatically
-# get built. There should ordinarily be no need to change any of
-# this part of makefile.
+# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
+# automatically get built. There should ordinarily be no need to change
+# any of this part of makefile.
#
# The dummy dependency is a place holder in case $(dynamic_ext) or
# $(static_ext) is empty.
s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
@$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+n_dummy $(nonxs_ext): miniperl preplibrary $(DYNALOADER) FORCE
+ @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
clean: _tidy _mopup
realclean: _cleaner _mopup
-cd pod; $(MAKE) clean
-cd utils; $(MAKE) clean
-cd x2p; $(MAKE) clean
- -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
+ -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
sh ext/util/make_ext clean $$x MAKE=$(MAKE) ; \
done
rm -f testcompile compilelog
-cd pod; $(MAKE) realclean
-cd utils; $(MAKE) realclean
-cd x2p; $(MAKE) realclean
- -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
+ -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
sh ext/util/make_ext realclean $$x MAKE=$(MAKE) ; \
done
rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
makedepend: makedepend.SH config.sh
sh ./makedepend.SH
-test-prep: miniperl perl preplibrary utilities $(dynamic_ext)
+test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext)
cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
test check: test-prep
case "$extspec" in
lib*) # Remove lib/auto prefix and /*.* suffix
pname=`echo "$extspec" | sed -e 's:^lib/auto/::' -e 's:/[^/]*\.[^/]*$::' ` ;;
+ext*) # Remove ext/ prefix and /pm_to_blib suffix
+ pname=`echo "$extspec" | sed -e 's:^ext/::' -e 's:/pm_to_blib$::' ` ;;
*::*) # Convert :: to /
pname=`echo "$extspec" | sed -e 's/::/\//g' ` ;;
*) pname="$extspec" ;;
target=all
;;
+nonxs) makeargs="";
+ target=all
+ ;;
+
*clean) # If Makefile has been moved to Makefile.old by a make clean
# then use Makefile.old for realclean rather than rebuild it
if test ! -f $makefile -a -f Makefile.old; then
goto magicalize;
case '!':
- if(len > 1)
+ if (len > 1)
break;
- if(sv_type > SVt_PV) {
+ if (sv_type > SVt_PV && curcop != &compiling) {
HV* stash = gv_stashpvn("Errno",5,FALSE);
if(!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;
# Error status.
*CHILD_ERROR = *? ;
- *OS_ERROR = \$! ;
- *ERRNO = \$! ;
+ *OS_ERROR = *! ;
+ *ERRNO = *! ;
*EXTENDED_OS_ERROR = *^E ;
*EVAL_ERROR = *@ ;