$(emacs) -L "$(top_srcdir)/admin" -l authors \
-f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)"
+FORCE:
+.PHONY: FORCE
-ETAGS = ../lib-src/etags
+tagsfiles = $(shell find ${srcdir} -name '*.el')
+tagsfiles := $(filter-out ${srcdir}/%loaddefs.el,${tagsfiles})
+tagsfiles := $(filter-out ${srcdir}/ldefs-boot.el,${tagsfiles})
+tagsfiles := $(filter-out ${srcdir}/eshell/esh-groups.el,${tagsfiles})
-lisptagsfiles1 = $(srcdir)/*.el
-lisptagsfiles2 = $(srcdir)/*/*.el
-lisptagsfiles3 = $(srcdir)/*/*/*.el
-lisptagsfiles4 = $(srcdir)/*/*/*/*.el
+ETAGS = ../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+ ${MAKE} -C ../lib-src $(notdir $@)
## The ls | sed | xargs is to stop the command line getting too long
## on MS Windows, when the MSYS Bash passes it to a MinGW compiled
## etags. It might be better to use find in a similar way to
## compile-main. But maybe this is not even necessary any more now
## that this uses relative filenames.
-TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
+TAGS: ${ETAGS} ${tagsfiles}
rm -f $@
touch $@
- ls $(lisptagsfiles1) $(lisptagsfiles2) \
- $(lisptagsfiles3) $(lisptagsfiles4) | \
- sed -e '/loaddefs/d; /\/ldefs-boot/d; /esh-groups\.el/d' | \
- xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
+ ls ${tagsfiles} | xargs $(XARGS_LIMIT) "${ETAGS}" -a -o $@
# The src/Makefile.in has its own set of dependencies and when they decide