-#! /bin/sh
case $PERL_CONFIG_SH in
'')
if test -f config.sh
: Prepare dependency lists for Makefile.
dynamic_list=' '
+dynamic_ext_re="lib/auto/re/re.$dlext"
extra_dep=''
for f in $dynamic_ext; do
: the dependency named here will never exist
nonxs_list=' '
for f in $nonxs_ext; do
p=`echo "$f" | tr / -`
- nonxs_list="$nonxs_list ext/$p/pm_to_blib"
+ for d in ext dist cpan; do
+ if test -d $d/$p; then
+ nonxs_list="$nonxs_list $d/$p/pm_to_blib"
+ fi
+ done
done
dtrace_h=''
MINIPERL_EXE = miniperl\$(EXE_EXT)
MINIPERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib
-#
+# Macros to invoke a copy of our fully operational perl during the build.
+PERL_EXE = perl\$(EXE_EXT)
+RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT)
+
+
dynamic_ext = $dynamic_list
+dynamic_ext_re = $dynamic_ext_re
static_ext = $static_list
nonxs_ext = $nonxs_list
ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
libs = $perllibs $cryptlib
-public = perl\$(EXE_EXT) utilities translators
+public = \$(PERL_EXE) utilities translators
shellflags = $shellflags
perltoc_pod_prereqs = extra.pods pod/perlapi.pod pod/perldelta.pod pod/perlintern.pod pod/perlmodlib.pod
generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
-Icwd = -Iext/Cwd -Iext/Cwd/lib
+Icwd = -Icpan/Cwd -Icpan/Cwd/lib
lintflags = \
-b \
$spitshell >>$Makefile <<'!NO!SUBS!'
-perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
+$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-@rm -f miniperl.xok
$(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
# Purify/Quantify Perls.
-pureperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
+pure$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
$(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-purecovperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
+purecov$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
$(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-quantperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
+quant$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
$(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
# Valgrind perl (currently Linux only)
unidatafiles $(unidatafiles): uni.data
uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
- $(MINIPERL) -Iext/Cwd/lib lib/unicore/mktables -C lib/unicore -w
+ $(MINIPERL) $(Icwd) lib/unicore/mktables -C lib/unicore -w
touch uni.data
-# perl$(EXE_EXT) and ext because buildtoc uses Text::Wrap uses re
+# $(PERL_EXE) and ext because buildtoc uses Text::Wrap uses re
# But also this ensures that all extensions are built before we try to scan
# them, which picks up Devel::PPPort's documentation.
-pod/perltoc.pod: $(perltoc_pod_prereqs) perl$(EXE_EXT) $(ext) pod/buildtoc
- $(LDLIBPTH) $(RUN) ./perl$(EXE_EXT) -f -Ilib pod/buildtoc --build-toc -q
+pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
+ $(RUN_PERL) -f -Ilib pod/buildtoc --build-toc -q
pod/perlapi.pod pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
$(MINIPERL) autodoc.pl
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
$(MINIPERL) $(Icwd) pod/perlmodlib.PL -q
-pod/perldelta.pod: pod/perl5110delta.pod
- $(LNS) perl5110delta.pod pod/perldelta.pod
+pod/perldelta.pod: pod/perl5112delta.pod
+ $(LNS) perl5112delta.pod pod/perldelta.pod
extra.pods: $(MINIPERL_EXE)
-@test ! -f extra.pods || rm -f `cat extra.pods`
echo "pod/perl"$$nx".pod" >> extra.pods ; \
done
-extras.make: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
+extras.make: $(PERL_EXE)
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
-extras.test: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
+extras.test: $(PERL_EXE)
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
-extras.install: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
+extras.install: $(PERL_EXE)
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
.PHONY: install install-strip install-all install-verbose install-silent \
no-install install.perl install.man install.html
META.yml: Porting/makemeta Porting/Maintainers.pl Porting/Maintainers.pm
- $(MINIPERL) Porting/makemeta
+ PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib Porting/makemeta
install-strip:
$(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
INSTALL_DEPENDENCE = all
install.perl: $(INSTALL_DEPENDENCE) installperl
- $(LDLIBPTH) $(RUN) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+ $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-@test ! -s extras.lst || $(MAKE) extras.install
install.man: all installman
- $(LDLIBPTH) $(RUN) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
+ $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
# XXX Experimental. Hardwired values, but useful for testing.
# Eventually Configure could ask for some of these values.
install.html: all installhtml
-@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
- $(LDLIBPTH) $(RUN) ./perl installhtml \
+ $(RUN_PERL) installhtml \
--podroot=. --podpath=. --recurse \
--htmldir=$(privlib)/html \
--htmlroot=$(privlib)/html \
.PHONY: printconfig
printconfig:
- @eval `$(LDLIBPTH) $(RUN) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
+ @eval `$(RUN_PERL) -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
.PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
realclean _realcleaner clobber _clobber \
-rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
-rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
- -rm -f perl$(EXE_EXT) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
+ -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
-rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
- -rm -f config.arch config.over $(DTRACE_H)
+ -rm -f config.arch config.over $(DTRACE_H) runtests
# Do not 'make _tidy' directly.
_tidy:
sh $(CLEAN).sh ; \
fi
rm -f realclean.sh veryclean.sh
- -@test ! -f ./$(MINIPERL_EXE) || $(MINIPERL) mkppport --clean
+ -for file in `find cpan dist ext -name ppport.h` ; do rm -f $$file; done
+
+# Dear POSIX, thanks for making the default to xargs to be
+# run once if nothhing is passed in. It is such a great help.
# Some systems do not support "?", so keep these files separate.
_cleaner2:
-rm -f core.*perl.*.? t/core.perl.*.? .?*.c
rm -f core *perl.core t/core t/*perl.core core.* t/core.*
- rm -f t/misctmp* t/forktmp* t/tmp* t/c t/perl$(EXE_EXT) t/rantests
+ rm -f t/misctmp* t/forktmp* t/tmp* t/c t/$(PERL_EXE) t/rantests
rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
rm -rf $(addedbyconf)
rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
-rm -f lib/ExtUtils/ParseXS/t/libXSTest.dll.a
_realcleaner:
- @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean
+ @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=distclean
@$(LDLIBPTH) $(MAKE) _cleaner2
_verycleaner:
sh ./makedepend.SH
.PHONY: test check test_prep test_prep_nodll test_prep_pre \
- test_tty test-tty test_notty test-notty \
+ test_prep_reonly test_tty test-tty test_notty test-notty \
utest ucheck test.utf8 check.utf8 test.torture torturetest \
test.utf16 check.utf16 utest.utf16 ucheck.utf16 \
test.third check.third utest.third ucheck.third test_notty.third \
test.deparse test_notty.deparse test_harness test_harness_notty \
- minitest coretest test.taintwarn test-reonly
+ minitest coretest test.taintwarn test-reonly _test
+
+_test:
+ echo >&2 The _test target is deprecated. Please upgrade your smoker
+ PERL=./perl ./runtests choose
# Cannot delegate rebuilding of t/perl to make
# to allow interlaced test and minitest
test_prep_pre: preplibrary utilities $(nonxs_ext)
-test_prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
+test_prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) $(dynamic_ext) $(TEST_PERL_DLL)
+ cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
+
+test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
+ $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
+ cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
test check: test_prep
- PERL=./perl ./runtests choose
+ ./runtests choose
test_tty: test_prep
- PERL=./perl ./runtests tty
+ ./runtests tty
test_notty: test_prep
- PERL=./perl ./runtests no-tty
+ ./runtests no-tty
utest ucheck test.utf8 check.utf8: test_prep
- PERL=./perl TEST_ARGS=-utf8 ./runtests choose
+ TEST_ARGS=-utf8 ./runtests choose
coretest: test_prep
- PERL=./perl TEST_ARGS=-core ./runtests choose
+ TEST_ARGS=-core ./runtests choose
test-prep: test_prep
# Torture testing
test.torture torturetest: test_prep
- PERL=./perl TEST_ARGS=-torture ./runtests choose
+ TEST_ARGS=-torture ./runtests choose
# Targets for UTF16 testing:
minitest.utf16: minitest.prep
- - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../$(MINIPERL_EXE) perl$(EXE_EXT)) \
- && $(LDLIBPTH) $(RUN) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+ - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
+ && $(RUN_PERL) TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
test.utf16 check.utf16: test_prep
- PERL=./perl TEST_ARGS=-utf16 ./runtests choose
+ TEST_ARGS=-utf16 ./runtests choose
utest.utf16 ucheck.utf16: test_prep
- PERL=./perl TEST_ARGS="-utf8 -utf16" ./runtests choose
+ TEST_ARGS="-utf8 -utf16" ./runtests choose
# Targets for valgrind testing:
test_prep.valgrind: test_prep perl.valgrind
test.valgrind check.valgrind: test_prep perl.valgrind.config
- PERL=./perl PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' ./runtests choose
+ PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' ./runtests choose
utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind.config
- PERL=./perl PERL_VALGRIND=1 TEST_ARGS=-utf8 ./runtests choose
+ PERL_VALGRIND=1 TEST_ARGS=-utf8 ./runtests choose
test_notty.valgrind: test_prep.valgrind perl.valgrind.config
- PERL=./perl PERL_VALGRIND=1 ./runtests no-tty
+ PERL_VALGRIND=1 ./runtests no-tty
# Targets for Third Degree testing.
test_prep.third: test_prep perl.third
+ cd t && (rm -f ./perl.third$(EXE_EXT); $(LNS) ../perl.third$(EXE_EXT) perl.third(EXE_EXT))
test.third check.third: test_prep.third perl.third
PERL=./perl.third PERL_3LOG=1 ./runtests choose
# Targets for Deparse testing.
test.deparse: test_prep
- PERL=./perl TEST_ARGS=-deparse ./runtests choose
+ TEST_ARGS=-deparse ./runtests choose
test_notty.deparse: test_prep
- PERL=./perl TEST_ARGS=-deparse ./runtests no-tty
+ TEST_ARGS=-deparse ./runtests no-tty
# Targets to run the test suite with -t
test.taintwarn: test_prep
- PERL=./perl TEST_ARGS=-taintwarn ./runtests choose
+ TEST_ARGS=-taintwarn ./runtests choose
minitest.prep:
-@test test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
# Can't depend on lib/Config.pm because that might be where miniperl
# is crashing.
minitest: $(MINIPERL_EXE) lib/re.pm minitest.prep
- - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../$(MINIPERL_EXE) perl$(EXE_EXT)) \
- && $(LDLIBPTH) $(RUN) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
+ - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
+ && $(RUN_PERL) TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t op/*.t uni/*.t </dev/tty
# Test via harness
test_harness: test_prep
- PERL=./perl TESTFILE=harness ./runtests choose
+ TESTFILE=harness ./runtests choose
test_harness_notty: test_prep
- PERL=./perl HARNESS_NOTTY=1 TESTFILE=harness ./runtests choose
+ HARNESS_NOTTY=1 TESTFILE=harness ./runtests choose
+
+test-reonly: test_prep_reonly
+ TEST_ARGS='-re \bre\/' TESTFILE=harness ./runtests choose
+
+
+# Porting tests (well-formedness of pod, manifest, etc)
-test-reonly: test_prep
- PERL=./perl TEST_ARGS='-re \bre\/' TESTFILE=harness ./runtests choose
+test_porting: test_prep
+ cd t && $(RUN_PERL) harness porting/*.t
# Handy way to run perlbug -ok without having to install and run the
# installed perlbug. We don't re-run the tests here - we trust the user.
.PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
ok: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
+ $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
okfile: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+ $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
oknack: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
+ $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
okfilenack: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
+ $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
nok: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
+ $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
nokfile: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
+ $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
noknack: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
+ $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
nokfilenack: utilities
- $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
+ $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
.PHONY: clist hlist shlist pllist