summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib-src/Makefile.in7
-rw-r--r--lisp/Makefile.in22
-rw-r--r--lwlib/Makefile.in15
-rw-r--r--nt/Makefile.in13
-rw-r--r--oldXMenu/Makefile.in17
-rw-r--r--src/Makefile.in22
6 files changed, 62 insertions, 34 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 2b65cb2e1a9..b666508e593 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -345,9 +345,12 @@ extraclean: maintainer-clean
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
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 3d0c95dcb5e..5f72e6ce23e 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -220,26 +220,28 @@ update-authors:
$(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
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index bfeef16571a..be12b4235b6 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -44,6 +44,7 @@ RANLIB=@RANLIB@
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
@@ -128,15 +129,17 @@ distclean: clean
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
diff --git a/nt/Makefile.in b/nt/Makefile.in
index fc6887f163e..86fca5f8e36 100644
--- a/nt/Makefile.in
+++ b/nt/Makefile.in
@@ -225,9 +225,18 @@ extraclean: maintainer-clean
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
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index de5b8e1114c..71dd5663f43 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -58,12 +58,12 @@ CC=@CC@
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 \
@@ -152,8 +152,17 @@ clean mostlyclean:
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
diff --git a/src/Makefile.in b/src/Makefile.in
index f96ebb2aeeb..97505b98687 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -649,32 +649,34 @@ extraclean: distclean
-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