This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
small wording fixes for perldelta
[perl5.git] / Makefile.SH
index 27c66bd..efeb8d6 100755 (executable)
@@ -56,12 +56,6 @@ true)
        pldlflags="$cccdlflags"
        static_ldflags=''
        case "${osname}${osvers}" in
-       next4*)
-               ld=libtool
-               lddlflags="-dynamic -undefined warning -framework System \
-               -compatibility_version 1 -current_version $patchlevel \
-               -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
-               ;;
        darwin*)
                shrpldflags="${ldflags} -dynamiclib \
                             -compatibility_version \
@@ -124,10 +118,15 @@ true)
                linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
                ;;
        os390*)
-            shrpldflags='-W l,XPLINK,dll'
-           linklibperl='libperl.x'
-           DPERL_EXTERNAL_GLOB=''
-           ;;
+            case "$use64bitall" in
+            define|true|[yY]*) shrpldflags='-Wl,LP64,dll'
+                   linklibperl='libperl.x'
+                   ;;
+            *)     shrpldflags='-Wl,XPLINK,dll'
+                  linklibperl='libperl.x'
+                  ;;
+            esac
+            ;;
        esac
        case "$ldlibpthname" in
        '') ;;
@@ -182,6 +181,16 @@ EOT
        ;;
 esac
 
+# ccdlflags, not to be confused with cccdlflags:
+case "${osname}" in
+aix)
+       # In AIX we need to change this for building Perl itself from
+       # the config.sh definition (which is for building external
+       # extensions *after* Perl has been built and installed)
+       ccdlflags=`echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
+       ;;
+esac
+
 : is Cwd static or dynamic
 static_cwd='define'
 list_util_dep='$(PERL_EXE)'
@@ -305,7 +314,6 @@ DLSUFFIX = .$dlext
 PLDLFLAGS = $pldlflags
 LIBPERL = $libperl
 LLIBPERL= $linklibperl
-LLIBPERL_NONSHR= $linklibperl_nonshr
 SHRPENV = $shrpenv
 
 # Static targets are ordinarily built without CCCDLFLAGS.  However,
@@ -333,7 +341,6 @@ HOST_EXE_EXT = $_exe
 EXE_EXT = $_exe
 LIB_EXT = $_a
 OBJ_EXT = $_o
-PATH_SEP = $p_
 
 # Macros to invoke a copy of miniperl during the build.  Targets which
 # are built using these macros should depend on \$(MINIPERL_EXE)
@@ -428,7 +435,7 @@ FIRSTMAKEFILE = $firstmakefile
 # Any special object files needed by this architecture, e.g. os2/os2.obj
 ARCHOBJS = $archobjs
 
-.SUFFIXES: .c \$(OBJ_EXT) .i .s
+.SUFFIXES: .c \$(OBJ_EXT) .i .s .c.depends
 
 # grrr
 SHELL = $sh
@@ -498,6 +505,15 @@ sh = $SH
 shextract = $shextract
 !GROK!THIS!
 
+# Source files where we build a variant for miniperl:
+mini_special='op perl universal'
+for file in $mini_special; do
+    mini_special_c="$mini_special_c ${file}mini.c"
+    mini_only_objs="$mini_only_objs ${file}mini\$(OBJ_EXT)"
+    main_only_objs="$main_only_objs ${file}\$(OBJ_EXT)"
+    ctags_exclude="$ctags_exclude --exclude=${file}mini.c"
+done
+
 ## In the following dollars and backticks do not need the extra backslash.
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
@@ -522,23 +538,31 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5) $(h6)
 
 c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro_core.c perl.c
 c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c
-c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c keywords.c
-c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c
+c3 = taint.c toke.c util.c deb.c run.c builtin.c universal.c pad.c globals.c keywords.c
+c4 = perlio.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c
 c5 = $(mallocsrc)
 
-c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c opmini.c perlmini.c
+!NO!SUBS!
+
+$spitshell >>$Makefile <<!GROK!THIS!
+mini_only_src  =$mini_special_c
+mini_only_objs =$mini_only_objs
+main_only_objs =$main_only_objs
+!GROK!THIS!
 
-obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) keywords$(OBJ_EXT)
+$spitshell >>$Makefile <<'!NO!SUBS!'
+
+c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c $(mini_only_src)
+
+obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) keywords$(OBJ_EXT) builtin$(OBJ_EXT)
 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) caretx$(OBJ_EXT) dquote$(OBJ_EXT) time64$(OBJ_EXT)
+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) dquote$(OBJ_EXT) time64$(OBJ_EXT)
 
 # split the objects into 3 exclusive sets: those used by both miniperl and
 # perl, and those used by just one or the other. Doesn't include the
 # actual perl(mini)main.o, nor any dtrace objects.
 
 common_objs    = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
-mini_only_objs = opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
-main_only_objs = op$(OBJ_EXT)     perl$(OBJ_EXT)
 
 miniperl_objs_nodt = $(mini_only_objs) $(common_objs) miniperlmain$(OBJ_EXT)
 perllib_objs_nodt  = $(main_only_objs) $(common_objs)
@@ -589,7 +613,7 @@ esac
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-perltoc_pod_prereqs = extra.pods pod/perl5317delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
+perltoc_pod_prereqs = extra.pods pod/perl5360delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
 generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
 generated_headers = uudmap.h bitcount.h mg_data.h
 
@@ -695,7 +719,7 @@ FORCE:
        @sh -c true
 !NO!SUBS!
 
-for file in op perl; do
+for file in $mini_special; do
     if $issymlink $file.c; then
         $spitshell >>$Makefile <<!GROK!THIS!
 
@@ -726,6 +750,9 @@ done
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
+cygwin.c: cygwin/cygwin.c
+       $(LNS) cygwin/cygwin.c
+
 globals$(OBJ_EXT): $(generated_headers)
 
 uudmap.h mg_data.h: bitcount.h
@@ -807,31 +834,10 @@ esac
 
 case "$osname" in
 aix)
-       $spitshell >>$Makefile <<!GROK!THIS!
-LIBS                   = $perllibs
-# In AIX we need to change this for building Perl itself from
-# its earlier definition (which is for building external
-# extensions *after* Perl has been built and installed)
-CCDLFLAGS              = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
-
-!GROK!THIS!
        case "$useshrplib" in
        define|true|[yY]*)
                $spitshell >>$Makefile <<'!NO!SUBS!'
 
-LIBPERL_NONSHR         = libperl_nonshr$(LIB_EXT)
-MINIPERL_NONSHR                = miniperl_nonshr$(EXE_EXT)
-
-$(LIBPERL_NONSHR): $(perllib_objs)
-       $(RMS) $(LIBPERL_NONSHR)
-       $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs)
-
-$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)  perlmini$(OBJ_EXT)
-       $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
-           opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
-
-MINIPERLEXP            = $(MINIPERL_NONSHR)
-
 LIBPERLEXPORT          = perl.exp
 
 !NO!SUBS!
@@ -839,7 +845,6 @@ LIBPERLEXPORT               = perl.exp
                ;;
        *)      
                $spitshell >>$Makefile <<'!NO!SUBS!'
-MINIPERLEXP            = $(MINIPERL_EXE)
 
 PERLEXPORT             = perl.exp
 
@@ -847,7 +852,7 @@ PERLEXPORT          = perl.exp
        ;;
        esac
        $spitshell >>$Makefile <<'!NO!SUBS!'
-perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
+perl.exp: $(MINIPERL_EXE) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
        $(MINIPERL) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp
 
 !NO!SUBS!
@@ -861,19 +866,6 @@ perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map
 
 !NO!SUBS!
        ;;
-cygwin)
-       $spitshell >>$Makefile <<'!NO!SUBS!'
-cygwin.c: cygwin/cygwin.c
-       $(LNS) cygwin/cygwin.c
-
-LIBPERL_NONSHR         = libperl$(LIB_EXT)
-
-$(LIBPERL_NONSHR): $(perllib_objs)
-       $(RMS) $(LIBPERL_NONSHR)
-       $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs)
-
-!NO!SUBS!
-       ;;
 esac
 
 if test -s $Makefile_s ; then
@@ -972,6 +964,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOADER) $(LIBPERLEXPORT)
 # b) have the rest of the Makefile depend on the more obvious $(MINIPERL_EXE)
 
 $(MINIPERL_EXE): lib/buildcustomize.pl
+       @touch $(MINIPERL_EXE)
 
 !NO!SUBS!
 
@@ -986,22 +979,6 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
        $(MINIPERL) -f write_buildcustomize.pl
 !NO!SUBS!
                ;;
-       aix*)
-               $spitshell >>$Makefile <<'!NO!SUBS!'
-lib/buildcustomize.pl: $& $(miniperl_objs)
-       $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(miniperl_objs) $(libs)
-       $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
-       $(MINIPERL) -f write_buildcustomize.pl
-!NO!SUBS!
-               ;;
-       next4*)
-               $spitshell >>$Makefile <<'!NO!SUBS!'
-lib/buildcustomize.pl: $& $(miniperl_objs) write    ldcustomize.pl
-       $(CC) -o $(MINIPERL_EXE) $(miniperl_objs    libs)
-       $(LDLIBPTH) ./miniperl$(HOST    _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
-       $(MINIPERL) -f write_buildcustomize.pl    
-!NO!SUBS!
-               ;;
        darwin*)
                case "$osvers" in
                [1-6].*) ;;
@@ -1053,7 +1030,7 @@ $(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
        -@rm -f miniperl.xok
 !NO!SUBS!
 
-        case $osname in
+        case "$osname" in
        # In AmigaOS the Perl executable needs to be linked with -ldl,
        # but none of the other executables should be.
         amigaos) $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -1153,9 +1130,9 @@ pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
 pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
        $(MINIPERL) pod/perlmodlib.PL -q
 
-pod/perl5317delta.pod: pod/perldelta.pod
-       $(RMS) pod/perl5317delta.pod
-       $(LNS) perldelta.pod pod/perl5317delta.pod
+pod/perl5360delta.pod: pod/perldelta.pod
+       $(RMS) pod/perl5360delta.pod
+       $(LNS) perldelta.pod pod/perl5360delta.pod
 
 extra.pods: $(MINIPERL_EXE)
        -@test ! -f extra.pods || rm -f `cat extra.pods`
@@ -1274,7 +1251,7 @@ SYMH = perlvars.h intrpvar.h
 CHMOD_W = chmod +w
 
 # The following files are generated automatically
-#      embed.pl:       proto.h embed.h embedvar.h perlapi.h perlapi.c
+#      embed.pl:       proto.h embed.h embedvar.h
 #      opcode.pl:      opcode.h opnames.h pp_proto.h
 #      regcomp.pl:     regnodes.h
 #      warnings.pl:    warnings.h lib/warnings.pm
@@ -1375,11 +1352,12 @@ veryclean:      _verycleaner _mopup _clobber
 
 # Do not 'make _mopup' directly.
 _mopup:
-       rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
+       rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c $(mini_only_src) generate_uudmap$(EXE_EXT) $(generated_headers)
        -rmdir .depending
+       -rm *.depends makedepend_file
        -@test -f extra.pods && rm -f `cat extra.pods`
        -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
-       -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
+       -rm -f perl.exp ext.libs $(generated_pods) uni.data $(mini_only_objs) pod/roffitall
        -rm -f perl.export perl.dll perl.libexp perl.map perl.def
        -rm -f *perl.xok
        -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
@@ -1401,7 +1379,7 @@ _cleaner1:
        -rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'`
 
 # Dear POSIX, thanks for making the default to xargs to be
-# run once if nothhing is passed in. It is such a great help.
+# run once if nothing is passed in. It is such a great help.
 
 # Some systems do not support "?", so keep these files separate.
 
@@ -1430,7 +1408,7 @@ _cleaner2:
        rm -rf pod/perlfunc pod/perlipc
        -rmdir ext/B/lib
        -rm -f dist/Time-HiRes/xdefine
-       rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
+       rm -f so_locations $(LIBPERL_NONSHR)
        -rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
        -rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
        -rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
@@ -1439,18 +1417,19 @@ _cleaner2:
        -rmdir lib/Test2/IPC/Driver lib/Test2/IPC lib/Test2/Hub/Interceptor
        -rmdir lib/Test2/Hub lib/Test2/Formatter lib/Test2/EventFacet/Info
        -rmdir lib/Test2/EventFacet lib/Test2/Event/TAP lib/Test2/Event
-       -rmdir lib/Test2/API lib/Test2 lib/Test/use lib/Test/Tester
-       -rmdir lib/Test/Builder/Tester lib/Test/Builder/IO lib/Test/Builder
-       -rmdir lib/Test lib/Term lib/TAP/Parser/YAMLish
-       -rmdir lib/TAP/Parser/SourceHandler lib/TAP/Parser/Scheduler
-       -rmdir lib/TAP/Parser/Result lib/TAP/Parser/Iterator lib/TAP/Parser
-       -rmdir lib/TAP/Harness lib/TAP/Formatter/File
-       -rmdir lib/TAP/Formatter/Console lib/TAP/Formatter lib/TAP
-       -rmdir lib/Sys/Syslog lib/Sys lib/Sub lib/Search lib/Scalar
-       -rmdir lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc lib/PerlIO/via
-       -rmdir lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse lib/Params
-       -rmdir lib/Net/FTP lib/Module/Load lib/Module/CoreList lib/Module
-       -rmdir lib/Memoize lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
+       -rmdir lib/Test2/API/InterceptResult lib/Test2/API lib/Test2
+       -rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Tester
+       -rmdir lib/Test/Builder/IO lib/Test/Builder lib/Test lib/Term
+       -rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler
+       -rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result
+       -rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness
+       -rmdir lib/TAP/Formatter/File lib/TAP/Formatter/Console
+       -rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub
+       -rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple
+       -rmdir lib/Pod/Perldoc lib/Pod/Html lib/PerlIO/via lib/PerlIO lib/Perl
+       -rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load
+       -rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigRat
+       -rmdir lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
        -rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List
        -rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter
        -rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib
@@ -1500,7 +1479,7 @@ cscope.out cscope: $(c) $(h)
 # The README below ensures that the dependency list is never empty and
 # that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding.
 
-MAKEDEPEND = Makefile makedepend
+MAKEDEPEND = Makefile makedepend_file makedepend
 
 $(FIRSTMAKEFILE):      README $(MAKEDEPEND)
        $(MAKE) depend MAKEDEPEND=
@@ -1521,6 +1500,9 @@ $spitshell >>$Makefile <<'!NO!SUBS!'
 depend: makedepend $(DTRACE_H) $(generated_headers)
        sh ./makedepend MAKE="$(MAKE)" cflags
 
+.c.c.depends:
+       sh ./makedepend_file $< $@ cflags
+
 .PHONY: test check test_prep test_prep_nodll test_prep_pre \
        test_prep_reonly test_tty test-tty test_notty test-notty \
        test_harness test_harness_notty minitest test-reonly _test
@@ -1657,15 +1639,15 @@ minitest_prep:
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm, or the Unicode data files."
        @echo " "
-       cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
+       cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE))
 
 MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t
 
 minitest: $(MINIPERL_EXE) minitest_prep
-       cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
+       cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
 
 minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
-       cd t && PERL_SKIP_TTY_TEST=1 $(RUN_PERL) TEST $(MINITEST_TESTS)
+       cd t && PERL_SKIP_TTY_TEST=1 $(RUN_PERL) TEST $(MINITEST_TESTS)
 
 # Test via harness
 
@@ -1676,13 +1658,13 @@ test_harness_notty: test_prep
        HARNESS_NOTTY=1 TESTFILE=harness $(RUN_TESTS) choose
 
 test_reonly test-reonly: test_prep_reonly
-       TEST_ARGS='-re \bre\/' TESTFILE=harness $(RUN_TESTS) choose
+       TEST_ARGS='re/*.t ext/re/t/*.t' TESTFILE=harness $(RUN_TESTS) choose
 
 
 # Porting tests (well-formedness of pod, manifest, etc)
 
 test_porting test-porting: test_prep
-       cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t
+       TEST_ARGS='porting/*.t lib/diagnostics.t' TESTFILE=harness $(RUN_TESTS) choose
 
 !NO!SUBS!
 
@@ -1742,13 +1724,16 @@ distcheck: FORCE
 
 TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
        etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+!NO!SUBS!
+
+$spitshell >>$Makefile <<!GROK!THIS!
 
 ctags:
-       ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h
+       ctags -f Tags -N --totals --languages=c --langmap=c:+.h $ctags_exclude *.c *.h
 
 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
 # If this runs make out of memory, delete /usr/include lines.
-!NO!SUBS!
+!GROK!THIS!
 
 $eunicefix Makefile
 $rm -f $firstmakefile