This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta up to c3b19b5c6
[perl5.git] / Makefile.SH
old mode 100644 (file)
new mode 100755 (executable)
index 8b8ac2c..998a6ee
@@ -198,6 +198,8 @@ $this_target: lib/auto/List/Util/Util.$dlext" ;;
 $this_target: uni.data" ;;
        Text/ParseWords) extra_dep="$extra_dep
 $this_target: lib/auto/Scalar/Util.$dlext" ;;
+       SDBM_File) extra_dep="$extra_dep
+$this_target: lib/auto/Cwd/Cwd.$dlext" ;;
     esac
 done
 
@@ -315,6 +317,8 @@ MINIPERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib
 PERL_EXE = perl\$(EXE_EXT)
 RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT)
 
+# Macros to run our tests
+RUN_TESTS = \$(LDLIBPTH) ./runtests
 
 dynamic_ext = $dynamic_list
 dynamic_ext_re = $dynamic_ext_re
@@ -436,21 +440,12 @@ sh = Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH \
 shextract = Makefile cflags config.h makeaperl makedepend \
        makedir myconfig writemain pod/Makefile
 
-# Files to be built with variable substitution after miniperl is
-# available.  Dependencies handled manually below (for now).
-
-pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \
-       pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
-
-plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
-       pod/pod2usage pod/podchecker pod/podselect
-
-addedbyconf = UU $(shextract) $(plextract) pstruct
+addedbyconf = UU $(shextract) pstruct
 
 # Unicode data files generated by mktables
-unidatafiles = lib/unicore/Canonical.pl lib/unicore/Exact.pl \
-       lib/unicore/Properties lib/unicore/Decomposition.pl \
-       lib/unicore/CombiningClass.pl lib/unicore/Name.pl lib/unicore/PVA.pl
+unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \
+       lib/unicore/CombiningClass.pl lib/unicore/Name.pl \
+       lib/unicore/Heavy.pl lib/unicore/mktables.lst
 
 # Directories of Unicode data files generated by mktables
 unidatadirs = lib/unicore/To lib/unicore/lib
@@ -459,7 +454,7 @@ h1 = EXTERN.h INTERN.h XSUB.h av.h $(CONFIGH) cop.h cv.h dosish.h
 h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h
 h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h
 h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
-h5 = utf8.h warnings.h mydtrace.h
+h5 = utf8.h warnings.h mydtrace.h op_reg_common.h
 h = $(h1) $(h2) $(h3) $(h4) $(h5)
 
 c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c
@@ -475,14 +470,14 @@ obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$
 obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
 obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
 
-mini_obj =  $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
+mini_obj =  $(obj1) $(obj2) $(obj3) $(ARCHOBJS) $(DTRACE_O)
 ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
 obj = $(ndt_obj) $(DTRACE_O)
 
-perltoc_pod_prereqs = extra.pods pod/perlapi.pod pod/perldelta.pod pod/perlintern.pod pod/perlmodlib.pod
+perltoc_pod_prereqs = extra.pods pod/perl5136delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
 generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
 
-Icwd = -Icpan/Cwd -Icpan/Cwd/lib
+Icwd = -Idist/Cwd -Idist/Cwd/lib
 
 lintflags = \
     -b \
@@ -551,24 +546,47 @@ splintfiles = $(c1)
 .c.s:
        $(CCCMDSRC) -S $*.c
 
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) miniperl $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
        @echo " ";
        @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
 
 .PHONY: all translators utilities
 
-lib/Config_git.pl git_version.h: $(MINIPERL_EXE) make_patchnum.pl
+# Both git_version.h and lib/Config_git.pl are built
+# by make_patchnum.pl.
+git_version.h: lib/Config_git.pl
+
+lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
        $(MINIPERL) make_patchnum.pl
 
 # make sure that we recompile perl.c if the git version changes
 perl$(OBJ_EXT): git_version.h
 
-translators:   $(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE
-       @echo " "; echo "       Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
+!NO!SUBS!
+
+# Making utilities and translators require Cwd.  If we have dynamic
+# loading, we only need miniperl and Cwd.$dlext.  If we have static
+# loading, we need to build perl first.
+case "$usedl" in
+define)
+    util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE'
+     x2p_deps='$(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) FORCE'
+    ;;
+*)  util_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+     x2p_deps='$(PERL_EXE) $(CONFIGPM) FORCE'
+    ;;
+esac
 
-utilities:     $(MINIPERL_EXE) $(CONFIGPM) $(plextract) FORCE
-       @echo " "; echo "       Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
+$spitshell >>$Makefile <<!GROK!THIS!
+translators:   $x2p_deps
+       @echo " "; echo "       Making x2p stuff"; cd x2p; \$(LDLIBPTH) \$(MAKE) all
 
+utilities:     $util_deps
+       @echo " "; echo "       Making utilities"; cd utils; \$(LDLIBPTH) \$(MAKE) all
+
+!GROK!THIS!
+
+$spitshell >>$Makefile <<'!NO!SUBS!'
 
 # This is now done by installman only if you actually want the man pages.
 #      @echo " "; echo "       Making docs"; cd pod; $(MAKE) all;
@@ -579,36 +597,47 @@ utilities:        $(MINIPERL_EXE) $(CONFIGPM) $(plextract) FORCE
 FORCE:
        @sh -c true
 !NO!SUBS!
-$spitshell >>$Makefile <<!GROK!THIS!
 
-# We do a copy of the op.c instead of a symlink because gcc gets huffy
+for file in op perl; do
+    if $issymlink $file.c; then
+        $spitshell >>$Makefile <<!GROK!THIS!
+
+# We do a copy of the $file.c instead of a symlink because gcc gets huffy
 # if we have a symlink forest to another disk (it complains about too many
 # levels of symbolic links, even if we have only two)
 
-opmini.c: op.c
-       \$(RMS) opmini.c
-       \$(CPS) op.c opmini.c
+${file}mini.c: $file.c
+       \$(RMS) ${file}mini.c
+       \$(CPS) ${file}.c ${file}mini.c
+!GROK!THIS!
+    else
+        $spitshell >>$Makefile <<!GROK!THIS!
 
-opmini\$(OBJ_EXT): opmini.c
-       \$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
+${file}mini.c: $file.c
+       \$(RMS) ${file}mini.c
+       \$(LNS) ${file}.c ${file}mini.c
+!GROK!THIS!
+    fi
 
-perlmini.c: perl.c
-       \$(RMS) perlmini.c
-       \$(CPS) perl.c perlmini.c
+    $spitshell >>$Makefile <<!GROK!THIS!
 
-perlmini\$(OBJ_EXT): perlmini.c
-       \$(CCCMD) \$(PLDLFLAGS) $DPERL_IS_MINIPERL perlmini.c
+${file}mini\$(OBJ_EXT): ${file}mini.c
+       \$(CCCMD) \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c
+!GROK!THIS!
+done
 
-globals\$(OBJ_EXT): uudmap.h bitcount.h
+$spitshell >>$Makefile <<'!NO!SUBS!'
 
-uudmap.h bitcount.h: generate_uudmap\$(HOST_EXE_EXT)
-       \$(RUN) ./generate_uudmap\$(HOST_EXE_EXT) uudmap.h bitcount.h
+globals$(OBJ_EXT): uudmap.h bitcount.h
 
-generate_uudmap\$(HOST_EXE_EXT): generate_uudmap\$(OBJ_EXT)
-       \$(CC) -o generate_uudmap\$(EXE_EXT) \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs)
+uudmap.h: bitcount.h
+
+bitcount.h: generate_uudmap$(HOST_EXE_EXT)
+       $(RUN) ./generate_uudmap$(HOST_EXE_EXT) uudmap.h bitcount.h
+
+generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
+       $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
 
-!GROK!THIS!
-$spitshell >>$Makefile <<'!NO!SUBS!'
 miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
        $(CCCMD) $(PLDLFLAGS) $*.c
 
@@ -964,7 +993,9 @@ $spitshell >>$Makefile <<'!NO!SUBS!'
 .PHONY: preplibrary
 preplibrary: $(MINIPERL_EXE) $(CONFIGPM) lib/re.pm $(PREPLIBRARY_LIBPERL)
 
-$(CONFIGPM_FROM_CONFIG_SH) $(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git.pl
+$(CONFIGPM_FROM_CONFIG_SH): $(CONFIGPOD)
+
+$(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git.pl
        $(MINIPERL) configpm
 
 lib/ExtUtils/Miniperl.pm: miniperlmain.c $(MINIPERL_EXE) minimod.pl $(CONFIGPM)
@@ -974,18 +1005,16 @@ lib/re.pm: ext/re/re.pm
        @-rm -f $@
        cp ext/re/re.pm lib/re.pm
 
-$(plextract):  $(MINIPERL_EXE) $(CONFIGPM) x2p/s2p $(dynamic_ext)
-       @-rm -f $@
-       $(MINIPERL) $@.PL
-
 x2p/s2p: $(MINIPERL_EXE) $(CONFIGPM) $(dynamic_ext) x2p/s2p.PL
        cd x2p; $(LDLIBPTH) $(MAKE) s2p
 
-unidatafiles $(unidatafiles): uni.data
+unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data
 
 uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
-       $(MINIPERL) $(Icwd) lib/unicore/mktables -C lib/unicore -w
-       touch uni.data
+       $(MINIPERL) $(Icwd) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
+#      Commented out so always runs, mktables looks at far more files than we
+#      can in this makefile to decide if needs to run or not
+#      touch uni.data
 
 # $(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
@@ -993,14 +1022,16 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
 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
+pod/perlapi.pod: pod/perlintern.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/perl5111delta.pod
-       $(LNS) perl5111delta.pod pod/perldelta.pod
+pod/perl5136delta.pod: pod/perldelta.pod
+       $(LNS) perldelta.pod pod/perl5136delta.pod
 
 extra.pods: $(MINIPERL_EXE)
        -@test ! -f extra.pods || rm -f `cat extra.pods`
@@ -1023,9 +1054,6 @@ extras.install: $(PERL_EXE)
 .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
-       PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib Porting/makemeta
-
 install-strip:
        $(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
 
@@ -1062,7 +1090,7 @@ install.html: all installhtml
       --splithead=pod/perlipc     \
       --splititem=pod/perlfunc    \
       --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \
-      --ignore=Porting/Maintainers.pm,Porting/patching.pod,Porting/pumpkin.pod,Porting/repository.pod \
+      --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \
       --verbose
 
 
@@ -1102,7 +1130,7 @@ CHMOD_W = chmod +w
 #                      perlapi.h perlapi.c 
 # [* embed.pl needs pp.sym generated by opcode.pl! *]
 #      keywords.pl:    keywords.h
-#      opcode.pl:      opcode.h opnames.h pp_proto.h pp.sym
+#      opcode.pl:      opcode.h opnames.h pp.sym
 #      regcomp.pl:     regnodes.h
 #      warnings.pl:    warnings.h lib/warnings.pm
 # The correct versions should be already supplied with the perl kit,
@@ -1112,7 +1140,7 @@ CHMOD_W = chmod +w
 # with your existing copy of perl
 # (make regen_headers is kept for backwards compatibility)
 
-AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
+AUTOGEN_FILES = keywords.h opcode.h opnames.h pp.sym proto.h \
                embed.h embedvar.h global.sym \
                perlapi.h perlapi.c regnodes.h \
                warnings.h lib/warnings.pm
@@ -1125,7 +1153,13 @@ regen:   FORCE
 regen_headers: FORCE
        -perl regen.pl -v
 
-regen_all: regen
+regen_meta:  META.yml
+
+META.yml:   FORCE
+       PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib Porting/makemeta
+
+
+regen_all: regen regen_meta
 
 .PHONY:        manisort manicheck
 
@@ -1149,7 +1183,7 @@ manicheck:        FORCE
 $(DYNALOADER): $(MINIPERL_EXE) preplibrary FORCE $(nonxs_ext)
        $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
 
-d_dummy $(dynamic_ext):        $(MINIPERL_EXE) preplibrary makeppport $(DYNALOADER) FORCE
+d_dummy $(dynamic_ext):        $(MINIPERL_EXE) preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT)
        $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
 
 s_dummy $(static_ext): $(MINIPERL_EXE) preplibrary makeppport $(DYNALOADER) FORCE
@@ -1205,7 +1239,7 @@ _mopup:
        -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) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
-       -rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
+       -rm -f opcode.h-old opnames.h-old pp.sym-old
        -rm -f config.arch config.over $(DTRACE_H) runtests
 
 # Do not 'make _tidy' directly.
@@ -1259,12 +1293,34 @@ _cleaner2:
        rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)
        rm -f lib/ExtUtils/ParseXS/t/XSTest$(DLSUFFIX)
        rm -fr lib/B
-       -rmdir lib/Data
-       -rmdir lib/Filter/Util lib/IO/Socket
-       -rmdir lib/List lib/MIME lib/Scalar lib/Sys
-       -rmdir lib/threads lib/XS
-       -rmdir lib/CPANPLUS/Dist/Build/t/dummy-*
-       -rmdir lib/CPANPLUS/t/dummy-cpanplus lib/CPANPLUS/t/dummy-localmirror
+       rm -fr lib/CPAN lib/CPANPLUS
+       rm -fr lib/ExtUtils/CBuilder
+       -rmdir cpan/CPANPLUS-Dist-Build/t/dummy-cpanplus cpan/CPANPLUS/t/dummy-cpanplus cpan/CPANPLUS/t/dummy-localmirror
+       -rmdir ext/B/lib
+       -rmdir lib/Archive/Tar lib/Archive lib/Attribute
+       -rmdir lib/CGI
+       -rmdir lib/Data lib/Devel lib/Digest
+       -rmdir lib/ExtUtils/Command lib/ExtUtils/Constant lib/ExtUtils/Liblist lib/ExtUtils/MakeMaker
+       -rmdir lib/File/Spec lib/Filter/Util lib/Filter
+       -rmdir lib/I18N/LangTags lib/IO/Socket lib/IO lib/IPC
+       -rmdir lib/List/Util lib/List
+       -rmdir lib/Locale/Maketext lib/Locale
+       -rmdir lib/Log/Message lib/Log
+       -rmdir lib/Math/Big* lib/Math
+       -rmdir lib/Memoize lib/MIME
+       -rmdir lib/Module/Build/Platform lib/Module/Build lib/Module/Load lib/Module
+       -rmdir lib/Net/FTP lib/Object
+       -rmdir lib/Parse/CPAN lib/Parse
+       -rmdir lib/PerlIO/via lib/PerlIO
+       -rmdir lib/Package lib/Params
+       -rmdir lib/Pod/Perldoc lib/Pod/Simple lib/Pod/Text
+       -rmdir lib/Sys lib/Scalar/Util lib/Scalar
+       -rmdir lib/Term/UI lib/Thread lib/Tie/Hash
+       -rmdir lib/Test/Builder/Tester lib/Test/Builder lib/Test
+       -rmdir lib/Unicode/Collate
+       -rmdir lib/XS/APItest lib/XS
+       -rmdir lib/inc/latest lib/inc
+       -rmdir lib/autodie/exception lib/autodie lib/encoding lib/threads
        -rm -f lib/ExtUtils/CBuilder/t/libcompilet.dll.a
        -rm -f lib/ExtUtils/ParseXS/t/libXSTest.dll.a
 
@@ -1309,6 +1365,9 @@ depend: makedepend
 makedepend: makedepend.SH config.sh
        sh ./makedepend.SH
 
+runtests: runtests.SH config.sh
+       sh ./runtests.SH
+
 .PHONY: test check test_prep test_prep_nodll test_prep_pre \
        test_prep_reonly test_tty test-tty test_notty test-notty \
        utest ucheck test.utf8 check.utf8 test.torture torturetest \
@@ -1319,7 +1378,7 @@ makedepend: makedepend.SH config.sh
 
 _test:
        echo >&2 The _test target is deprecated. Please upgrade your smoker
-       PERL=./perl ./runtests choose
+       PERL=./perl $(RUN_TESTS) choose
 
 # Cannot delegate rebuilding of t/perl to make
 # to allow interlaced test and minitest
@@ -1328,7 +1387,7 @@ _test:
 
 test_prep_pre: preplibrary utilities $(nonxs_ext)
 
-test_prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) $(dynamic_ext) $(TEST_PERL_DLL)
+test_prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) $(dynamic_ext) $(TEST_PERL_DLL) runtests x2p/s2p
        cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
 
 test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
@@ -1336,19 +1395,19 @@ test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
        cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
 
 test check: test_prep
-       ./runtests choose
+       $(RUN_TESTS) choose
 
 test_tty: test_prep
-       ./runtests tty
+       $(RUN_TESTS) tty
 
 test_notty: test_prep
-       ./runtests no-tty
+       $(RUN_TESTS) no-tty
 
 utest ucheck test.utf8 check.utf8: test_prep
-       TEST_ARGS=-utf8 ./runtests choose
+       TEST_ARGS=-utf8 $(RUN_TESTS) choose
 
 coretest: test_prep
-       TEST_ARGS=-core ./runtests choose
+       TEST_ARGS=-core $(RUN_TESTS) choose
 
 test-prep:     test_prep
 
@@ -1359,7 +1418,7 @@ test-notty:       test_notty
 # Torture testing
 
 test.torture torturetest:      test_prep
-       TEST_ARGS=-torture ./runtests choose
+       TEST_ARGS=-torture $(RUN_TESTS) choose
 
 # Targets for UTF16 testing:
 
@@ -1368,23 +1427,23 @@ minitest.utf16: minitest.prep
                && $(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
-       TEST_ARGS=-utf16 ./runtests choose
+       TEST_ARGS=-utf16 $(RUN_TESTS) choose
 
 utest.utf16 ucheck.utf16: test_prep
-       TEST_ARGS="-utf8 -utf16" ./runtests choose
+       TEST_ARGS="-utf8 -utf16" $(RUN_TESTS) choose
 
 # Targets for valgrind testing:
 
 test_prep.valgrind: test_prep perl.valgrind
 
 test.valgrind check.valgrind:  test_prep perl.valgrind.config
-       PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' ./runtests choose
+       PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' $(RUN_TESTS) choose
 
 utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind.config
-       PERL_VALGRIND=1 TEST_ARGS=-utf8 ./runtests choose
+       PERL_VALGRIND=1 TEST_ARGS=-utf8 $(RUN_TESTS) choose
 
 test_notty.valgrind: test_prep.valgrind perl.valgrind.config
-       PERL_VALGRIND=1 ./runtests no-tty
+       PERL_VALGRIND=1 $(RUN_TESTS) no-tty
 
 # Targets for Third Degree testing.
 
@@ -1392,29 +1451,29 @@ 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
+       PERL=./perl.third PERL_3LOG=1 $(RUN_TESTS) choose
 
 utest.third ucheck.third: test_prep.third perl.third
-       PERL=./perl.third PERL_3LOG=1 TEST_ARGS=-utf8 ./runtests choose
+       PERL=./perl.third PERL_3LOG=1 TEST_ARGS=-utf8 $(RUN_TESTS) choose
 
 test_notty.third: test_prep.third perl.third
-       PERL=./perl.third PERL_3LOG=1 ./runtests choose
+       PERL=./perl.third PERL_3LOG=1 $(RUN_TESTS) choose
 
 # Targets for Deparse testing.
 
 test.deparse:  test_prep
-       TEST_ARGS=-deparse ./runtests choose
+       TEST_ARGS=-deparse $(RUN_TESTS) choose
 
 test_notty.deparse:    test_prep
-       TEST_ARGS=-deparse ./runtests no-tty
+       TEST_ARGS=-deparse $(RUN_TESTS) no-tty
 
 # Targets to run the test suite with -t
 
 test.taintwarn:        test_prep
-       TEST_ARGS=-taintwarn ./runtests choose
+       TEST_ARGS=-taintwarn $(RUN_TESTS) choose
 
 minitest.prep:
-       -@test test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
+       -@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
        @echo " "
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm, or the Unicode data files."
@@ -1429,13 +1488,13 @@ minitest: $(MINIPERL_EXE) lib/re.pm minitest.prep
 # Test via harness
 
 test_harness: test_prep
-       TESTFILE=harness ./runtests choose
+       TESTFILE=harness $(RUN_TESTS) choose
 
 test_harness_notty: test_prep
-       HARNESS_NOTTY=1 TESTFILE=harness ./runtests choose
+       HARNESS_NOTTY=1 TESTFILE=harness $(RUN_TESTS) choose
 
 test-reonly: test_prep_reonly
-       TEST_ARGS='-re \bre\/' TESTFILE=harness ./runtests choose
+       TEST_ARGS='-re \bre\/' TESTFILE=harness $(RUN_TESTS) choose
 
 
 # Porting tests (well-formedness of pod, manifest, etc)
@@ -1474,7 +1533,7 @@ noknack:  utilities
 nokfilenack:   utilities
        $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
 
-.PHONY: clist hlist shlist pllist
+.PHONY: clist hlist shlist
 
 clist: $(c)
        echo $(c) | tr ' ' $(TRNL) >.clist
@@ -1485,9 +1544,6 @@ hlist:  $(h)
 shlist: $(sh)
        echo $(sh) | tr ' ' $(TRNL) >.shlist
 
-pllist: $(pl)
-       echo $(pl) | tr ' ' $(TRNL) >.pllist
-
 Makefile: Makefile.SH ./config.sh
        $(SHELL) Makefile.SH
 
@@ -1495,24 +1551,7 @@ Makefile: Makefile.SH ./config.sh
 distcheck: FORCE
        perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()'
 
-.PHONY: elc
-elc:   emacs/cperl-mode.elc
-
-emacs/cperl-mode.elc: emacs/cperl-mode.el
-       -cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el
-
-.PHONY: etags ctags tags
-
-etags: TAGS
-
-TAGS: emacs/cperl-mode.elc
-       sh emacs/ptags
-
-# Let's hope make will not go into an infinite loop on case-unsensitive systems
-# This may also fail if . is in the head of the path, since perl will
-# require -Ilib
-tags:  TAGS
-       perl emacs/e2ctags.pl TAGS > tags
+.PHONY: ctags
 
 ctags:
        ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h