* lib-src/Makefile.in (tagsfiles): New variable.
(TAGS): Also depend on the source files. Use our own etags program.
* lisp/Makefile.in (ETAGS): Add EXEEXT.
(lisptagsfiles1, lisptagsfiles2, lisptagsfiles3, lisptagsfiles4):
Remove.
(tagsfiles): New, replacing lisptagsfiles1 etc.
Remove irrelevant source files here rather than in the TAGS rule.
(${ETAGS}): New rule.
(TAGS): Also depend on the etags executable.
* lwlib/Makefile.in (EXEEXT): New, set by configure.
(ETAGS): Add EXEEXT.
(${ETAGS}): New rule.
(ctagsfiles): Use "wildcard".
(TAGS): Also depend on the etags executable.
* nt/Makefile.in (ETAGS, tagsfiles): New variables.
(${ETAGS}): New rule.
(TAGS): Fix dependencies.
* oldXMenu/Makefile.in (EXEEXT): New, set by configure.
(ETAGS): New variable, replacing $TAGS. Use our own etags program.
Remove "-t" argument.
(${ETAGS}): New rule.
(tagsfiles): New variable.
(TAGS): New rule, with proper dependencies.
* src/Makefile.in (ETAGS): Add EXEEXT. Add a build rule.
(ctagsfiles1, ctagsfiles2): Use "wildcard".
(ctagsfiles3): Remove.
(TAGS): Depend on etags.
(../lisp/TAGS, $(lwlibdir)/TAGS): Let the rules in the relevant
directories decide if updates are needed.
check:
@echo "We don't have any tests for the lib-src/ directory yet."
+tagsfiles = $(wildcard ${srcdir}/*.[ch])
+
+.PHONY: tags
tags: TAGS
-TAGS: etags${EXEEXT}
- etags *.[ch]
+TAGS: etags${EXEEXT} ${tagsfiles}
+ ./etags ${tagsfiles}
../lib/libgnu.a: $(config_h)
$(MAKE) -C ../lib all
$(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
AR = @AR@
ARFLAGS = @ARFLAGS@
MKDIR_P = @MKDIR_P@
+EXEEXT = @EXEEXT@
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
MOTIF_OBJS = lwlib-Xm.o
bootstrap-clean maintainer-clean: distclean
rm -f TAGS
+ETAGS = ../lib-src/etags${EXEEXT}
-ETAGS = ../lib-src/etags
+${ETAGS}: FORCE
+ ${MAKE} -C ../lib-src $(notdir $@)
-ctagsfiles= $(srcdir)/*.[ch]
+ctagsfiles= $(wildcard ${srcdir}/*.[ch])
-TAGS: $(ctagsfiles)
- "$(ETAGS)" $(ctagsfiles)
+FORCE:
+.PHONY: tags FORCE
tags: TAGS
-.PHONY: tags
-
+TAGS: ${ETAGS} $(ctagsfiles)
+ ${ETAGS} $(ctagsfiles)
### Makefile.in ends here
check:
@echo "We don't have any tests for the nt/ directory yet."
+ETAGS = ../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+ ${MAKE} -C ../lib-src $(notdir $@)
+
+tagsfiles= $(wildcard ${srcdir}/*.[ch])
+
+FORCE:
+.PHONY: tags FORCE
tags: TAGS
-TAGS: ${EXE_FILES:${EXEEXT}=.c}
- ../lib-src/etags *.[ch]
+TAGS: ${ETAGS} ${tagsfiles}
+ ${ETAGS} ${tagsfiles}
## Build the programs
addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
CFLAGS=@CFLAGS@
CPPFLAGS = @CPPFLAGS@
-TAGS = etags
RM = rm -f
RANLIB = @RANLIB@
AR = @AR@
ARFLAGS = @ARFLAGS@
MKDIR_P = @MKDIR_P@
+EXEEXT = @EXEEXT@
OBJS = Activate.o \
AddPane.o \
bootstrap-clean maintainer-clean distclean: clean
rm -f Makefile
-.PHONY: tags
-tags:
- $(TAGS) -t *.[ch]
+ETAGS = ../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+ ${MAKE} -C ../lib-src $(notdir $@)
+
+tagsfiles = $(wildcard ${srcdir}/*.[ch])
+
+FORCE:
+.PHONY: tags FORCE
+tags: TAGS
+TAGS: ${ETAGS} ${tagsfiles}
+ ${ETAGS} ${tagsfiles}
### Makefile.in ends here
-rm -f *~ \#*
-ETAGS = ../lib-src/etags
+ETAGS = ../lib-src/etags${EXEEXT}
-ctagsfiles1 = [xyzXYZ]*.[hc]
-ctagsfiles2 = [a-wA-W]*.[hc]
-ctagsfiles3 = [a-zA-Z]*.m
+${ETAGS}: FORCE
+ ${MAKE} -C ../lib-src $(notdir $@)
+
+ctagsfiles1 = $(wildcard ${srcdir}/*.[hc])
+ctagsfiles2 = $(wildcard ${srcdir}/*.m)
## FIXME? In out-of-tree builds, should TAGS be generated in srcdir?
## This does not need to depend on ../lisp and ../lwlib TAGS files,
## because etags "--include" only includes a pointer to the file,
## rather than the file contents.
-TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3)
- "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
+TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2)
+ ${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
- $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \
+ $(ctagsfiles1) \
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
- $(srcdir)/$(ctagsfiles3)
+ $(ctagsfiles2)
## Arrange to make tags tables for ../lisp and ../lwlib,
## which the above TAGS file for the C files includes by reference.
-../lisp/TAGS:
+../lisp/TAGS: FORCE
$(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
-$(lwlibdir)/TAGS:
+$(lwlibdir)/TAGS: FORCE
$(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS