aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2016-01-06 18:25:47 -0500
committerGlenn Morris2016-01-06 18:25:47 -0500
commitc6d3c60f283a9c2071b4db185773a00e53e20a61 (patch)
tree07222d80f5c1a4fd24cd9ea07e9911ff4bf009e6
parentefa8087d4b681a6bf673ec6f2d8220bf98705e72 (diff)
downloademacs-c6d3c60f283a9c2071b4db185773a00e53e20a61.tar.gz
emacs-c6d3c60f283a9c2071b4db185773a00e53e20a61.zip
Build tweaks related to tags files.
* 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.
-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
345check: 345check:
346 @echo "We don't have any tests for the lib-src/ directory yet." 346 @echo "We don't have any tests for the lib-src/ directory yet."
347 347
348tagsfiles = $(wildcard ${srcdir}/*.[ch])
349
350.PHONY: tags
348tags: TAGS 351tags: TAGS
349TAGS: etags${EXEEXT} 352TAGS: etags${EXEEXT} ${tagsfiles}
350 etags *.[ch] 353 ./etags ${tagsfiles}
351 354
352../lib/libgnu.a: $(config_h) 355../lib/libgnu.a: $(config_h)
353 $(MAKE) -C ../lib all 356 $(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:
220 $(emacs) -L "$(top_srcdir)/admin" -l authors \ 220 $(emacs) -L "$(top_srcdir)/admin" -l authors \
221 -f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)" 221 -f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)"
222 222
223FORCE:
224.PHONY: FORCE
223 225
224ETAGS = ../lib-src/etags 226tagsfiles = $(shell find ${srcdir} -name '*.el')
227tagsfiles := $(filter-out ${srcdir}/%loaddefs.el,${tagsfiles})
228tagsfiles := $(filter-out ${srcdir}/ldefs-boot.el,${tagsfiles})
229tagsfiles := $(filter-out ${srcdir}/eshell/esh-groups.el,${tagsfiles})
225 230
226lisptagsfiles1 = $(srcdir)/*.el 231ETAGS = ../lib-src/etags${EXEEXT}
227lisptagsfiles2 = $(srcdir)/*/*.el 232
228lisptagsfiles3 = $(srcdir)/*/*/*.el 233${ETAGS}: FORCE
229lisptagsfiles4 = $(srcdir)/*/*/*/*.el 234 ${MAKE} -C ../lib-src $(notdir $@)
230 235
231## The ls | sed | xargs is to stop the command line getting too long 236## The ls | sed | xargs is to stop the command line getting too long
232## on MS Windows, when the MSYS Bash passes it to a MinGW compiled 237## on MS Windows, when the MSYS Bash passes it to a MinGW compiled
233## etags. It might be better to use find in a similar way to 238## etags. It might be better to use find in a similar way to
234## compile-main. But maybe this is not even necessary any more now 239## compile-main. But maybe this is not even necessary any more now
235## that this uses relative filenames. 240## that this uses relative filenames.
236TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) 241TAGS: ${ETAGS} ${tagsfiles}
237 rm -f $@ 242 rm -f $@
238 touch $@ 243 touch $@
239 ls $(lisptagsfiles1) $(lisptagsfiles2) \ 244 ls ${tagsfiles} | xargs $(XARGS_LIMIT) "${ETAGS}" -a -o $@
240 $(lisptagsfiles3) $(lisptagsfiles4) | \
241 sed -e '/loaddefs/d; /\/ldefs-boot/d; /esh-groups\.el/d' | \
242 xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
243 245
244 246
245# The src/Makefile.in has its own set of dependencies and when they decide 247# 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@
44AR = @AR@ 44AR = @AR@
45ARFLAGS = @ARFLAGS@ 45ARFLAGS = @ARFLAGS@
46MKDIR_P = @MKDIR_P@ 46MKDIR_P = @MKDIR_P@
47EXEEXT = @EXEEXT@
47 48
48LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o 49LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
49MOTIF_OBJS = lwlib-Xm.o 50MOTIF_OBJS = lwlib-Xm.o
@@ -128,15 +129,17 @@ distclean: clean
128bootstrap-clean maintainer-clean: distclean 129bootstrap-clean maintainer-clean: distclean
129 rm -f TAGS 130 rm -f TAGS
130 131
132ETAGS = ../lib-src/etags${EXEEXT}
131 133
132ETAGS = ../lib-src/etags 134${ETAGS}: FORCE
135 ${MAKE} -C ../lib-src $(notdir $@)
133 136
134ctagsfiles= $(srcdir)/*.[ch] 137ctagsfiles= $(wildcard ${srcdir}/*.[ch])
135 138
136TAGS: $(ctagsfiles) 139FORCE:
137 "$(ETAGS)" $(ctagsfiles) 140.PHONY: tags FORCE
138tags: TAGS 141tags: TAGS
139.PHONY: tags 142TAGS: ${ETAGS} $(ctagsfiles)
140 143 ${ETAGS} $(ctagsfiles)
141 144
142### Makefile.in ends here 145### 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
225check: 225check:
226 @echo "We don't have any tests for the nt/ directory yet." 226 @echo "We don't have any tests for the nt/ directory yet."
227 227
228ETAGS = ../lib-src/etags${EXEEXT}
229
230${ETAGS}: FORCE
231 ${MAKE} -C ../lib-src $(notdir $@)
232
233tagsfiles= $(wildcard ${srcdir}/*.[ch])
234
235FORCE:
236.PHONY: tags FORCE
228tags: TAGS 237tags: TAGS
229TAGS: ${EXE_FILES:${EXEEXT}=.c} 238TAGS: ${ETAGS} ${tagsfiles}
230 ../lib-src/etags *.[ch] 239 ${ETAGS} ${tagsfiles}
231 240
232## Build the programs 241## Build the programs
233addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h 242addpm${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@
58CFLAGS=@CFLAGS@ 58CFLAGS=@CFLAGS@
59CPPFLAGS = @CPPFLAGS@ 59CPPFLAGS = @CPPFLAGS@
60 60
61TAGS = etags
62RM = rm -f 61RM = rm -f
63RANLIB = @RANLIB@ 62RANLIB = @RANLIB@
64AR = @AR@ 63AR = @AR@
65ARFLAGS = @ARFLAGS@ 64ARFLAGS = @ARFLAGS@
66MKDIR_P = @MKDIR_P@ 65MKDIR_P = @MKDIR_P@
66EXEEXT = @EXEEXT@
67 67
68OBJS = Activate.o \ 68OBJS = Activate.o \
69 AddPane.o \ 69 AddPane.o \
@@ -152,8 +152,17 @@ clean mostlyclean:
152bootstrap-clean maintainer-clean distclean: clean 152bootstrap-clean maintainer-clean distclean: clean
153 rm -f Makefile 153 rm -f Makefile
154 154
155.PHONY: tags 155ETAGS = ../lib-src/etags${EXEEXT}
156tags: 156
157 $(TAGS) -t *.[ch] 157${ETAGS}: FORCE
158 ${MAKE} -C ../lib-src $(notdir $@)
159
160tagsfiles = $(wildcard ${srcdir}/*.[ch])
161
162FORCE:
163.PHONY: tags FORCE
164tags: TAGS
165TAGS: ${ETAGS} ${tagsfiles}
166 ${ETAGS} ${tagsfiles}
158 167
159### Makefile.in ends here 168### 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
649 -rm -f *~ \#* 649 -rm -f *~ \#*
650 650
651 651
652ETAGS = ../lib-src/etags 652ETAGS = ../lib-src/etags${EXEEXT}
653 653
654ctagsfiles1 = [xyzXYZ]*.[hc] 654${ETAGS}: FORCE
655ctagsfiles2 = [a-wA-W]*.[hc] 655 ${MAKE} -C ../lib-src $(notdir $@)
656ctagsfiles3 = [a-zA-Z]*.m 656
657ctagsfiles1 = $(wildcard ${srcdir}/*.[hc])
658ctagsfiles2 = $(wildcard ${srcdir}/*.m)
657 659
658## FIXME? In out-of-tree builds, should TAGS be generated in srcdir? 660## FIXME? In out-of-tree builds, should TAGS be generated in srcdir?
659 661
660## This does not need to depend on ../lisp and ../lwlib TAGS files, 662## This does not need to depend on ../lisp and ../lwlib TAGS files,
661## because etags "--include" only includes a pointer to the file, 663## because etags "--include" only includes a pointer to the file,
662## rather than the file contents. 664## rather than the file contents.
663TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3) 665TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2)
664 "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ 666 ${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
665 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ 667 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
666 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ 668 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
667 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \ 669 $(ctagsfiles1) \
668 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ 670 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
669 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ 671 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
670 $(srcdir)/$(ctagsfiles3) 672 $(ctagsfiles2)
671 673
672## Arrange to make tags tables for ../lisp and ../lwlib, 674## Arrange to make tags tables for ../lisp and ../lwlib,
673## which the above TAGS file for the C files includes by reference. 675## which the above TAGS file for the C files includes by reference.
674../lisp/TAGS: 676../lisp/TAGS: FORCE
675 $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)" 677 $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
676 678
677$(lwlibdir)/TAGS: 679$(lwlibdir)/TAGS: FORCE
678 $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)" 680 $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
679 681
680tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS 682tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS