diff options
| author | Glenn Morris | 2016-01-06 18:25:47 -0500 |
|---|---|---|
| committer | Glenn Morris | 2016-01-06 18:25:47 -0500 |
| commit | c6d3c60f283a9c2071b4db185773a00e53e20a61 (patch) | |
| tree | 07222d80f5c1a4fd24cd9ea07e9911ff4bf009e6 | |
| parent | efa8087d4b681a6bf673ec6f2d8220bf98705e72 (diff) | |
| download | emacs-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.in | 7 | ||||
| -rw-r--r-- | lisp/Makefile.in | 22 | ||||
| -rw-r--r-- | lwlib/Makefile.in | 15 | ||||
| -rw-r--r-- | nt/Makefile.in | 13 | ||||
| -rw-r--r-- | oldXMenu/Makefile.in | 17 | ||||
| -rw-r--r-- | src/Makefile.in | 22 |
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 | |||
| 345 | check: | 345 | check: |
| 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 | ||
| 348 | tagsfiles = $(wildcard ${srcdir}/*.[ch]) | ||
| 349 | |||
| 350 | .PHONY: tags | ||
| 348 | tags: TAGS | 351 | tags: TAGS |
| 349 | TAGS: etags${EXEEXT} | 352 | TAGS: 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 | ||
| 223 | FORCE: | ||
| 224 | .PHONY: FORCE | ||
| 223 | 225 | ||
| 224 | ETAGS = ../lib-src/etags | 226 | tagsfiles = $(shell find ${srcdir} -name '*.el') |
| 227 | tagsfiles := $(filter-out ${srcdir}/%loaddefs.el,${tagsfiles}) | ||
| 228 | tagsfiles := $(filter-out ${srcdir}/ldefs-boot.el,${tagsfiles}) | ||
| 229 | tagsfiles := $(filter-out ${srcdir}/eshell/esh-groups.el,${tagsfiles}) | ||
| 225 | 230 | ||
| 226 | lisptagsfiles1 = $(srcdir)/*.el | 231 | ETAGS = ../lib-src/etags${EXEEXT} |
| 227 | lisptagsfiles2 = $(srcdir)/*/*.el | 232 | |
| 228 | lisptagsfiles3 = $(srcdir)/*/*/*.el | 233 | ${ETAGS}: FORCE |
| 229 | lisptagsfiles4 = $(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. |
| 236 | TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | 241 | TAGS: ${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@ | |||
| 44 | AR = @AR@ | 44 | AR = @AR@ |
| 45 | ARFLAGS = @ARFLAGS@ | 45 | ARFLAGS = @ARFLAGS@ |
| 46 | MKDIR_P = @MKDIR_P@ | 46 | MKDIR_P = @MKDIR_P@ |
| 47 | EXEEXT = @EXEEXT@ | ||
| 47 | 48 | ||
| 48 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o | 49 | LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o |
| 49 | MOTIF_OBJS = lwlib-Xm.o | 50 | MOTIF_OBJS = lwlib-Xm.o |
| @@ -128,15 +129,17 @@ distclean: clean | |||
| 128 | bootstrap-clean maintainer-clean: distclean | 129 | bootstrap-clean maintainer-clean: distclean |
| 129 | rm -f TAGS | 130 | rm -f TAGS |
| 130 | 131 | ||
| 132 | ETAGS = ../lib-src/etags${EXEEXT} | ||
| 131 | 133 | ||
| 132 | ETAGS = ../lib-src/etags | 134 | ${ETAGS}: FORCE |
| 135 | ${MAKE} -C ../lib-src $(notdir $@) | ||
| 133 | 136 | ||
| 134 | ctagsfiles= $(srcdir)/*.[ch] | 137 | ctagsfiles= $(wildcard ${srcdir}/*.[ch]) |
| 135 | 138 | ||
| 136 | TAGS: $(ctagsfiles) | 139 | FORCE: |
| 137 | "$(ETAGS)" $(ctagsfiles) | 140 | .PHONY: tags FORCE |
| 138 | tags: TAGS | 141 | tags: TAGS |
| 139 | .PHONY: tags | 142 | TAGS: ${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 | |||
| 225 | check: | 225 | check: |
| 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 | ||
| 228 | ETAGS = ../lib-src/etags${EXEEXT} | ||
| 229 | |||
| 230 | ${ETAGS}: FORCE | ||
| 231 | ${MAKE} -C ../lib-src $(notdir $@) | ||
| 232 | |||
| 233 | tagsfiles= $(wildcard ${srcdir}/*.[ch]) | ||
| 234 | |||
| 235 | FORCE: | ||
| 236 | .PHONY: tags FORCE | ||
| 228 | tags: TAGS | 237 | tags: TAGS |
| 229 | TAGS: ${EXE_FILES:${EXEEXT}=.c} | 238 | TAGS: ${ETAGS} ${tagsfiles} |
| 230 | ../lib-src/etags *.[ch] | 239 | ${ETAGS} ${tagsfiles} |
| 231 | 240 | ||
| 232 | ## Build the programs | 241 | ## Build the programs |
| 233 | addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h | 242 | 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@ | |||
| 58 | CFLAGS=@CFLAGS@ | 58 | CFLAGS=@CFLAGS@ |
| 59 | CPPFLAGS = @CPPFLAGS@ | 59 | CPPFLAGS = @CPPFLAGS@ |
| 60 | 60 | ||
| 61 | TAGS = etags | ||
| 62 | RM = rm -f | 61 | RM = rm -f |
| 63 | RANLIB = @RANLIB@ | 62 | RANLIB = @RANLIB@ |
| 64 | AR = @AR@ | 63 | AR = @AR@ |
| 65 | ARFLAGS = @ARFLAGS@ | 64 | ARFLAGS = @ARFLAGS@ |
| 66 | MKDIR_P = @MKDIR_P@ | 65 | MKDIR_P = @MKDIR_P@ |
| 66 | EXEEXT = @EXEEXT@ | ||
| 67 | 67 | ||
| 68 | OBJS = Activate.o \ | 68 | OBJS = Activate.o \ |
| 69 | AddPane.o \ | 69 | AddPane.o \ |
| @@ -152,8 +152,17 @@ clean mostlyclean: | |||
| 152 | bootstrap-clean maintainer-clean distclean: clean | 152 | bootstrap-clean maintainer-clean distclean: clean |
| 153 | rm -f Makefile | 153 | rm -f Makefile |
| 154 | 154 | ||
| 155 | .PHONY: tags | 155 | ETAGS = ../lib-src/etags${EXEEXT} |
| 156 | tags: | 156 | |
| 157 | $(TAGS) -t *.[ch] | 157 | ${ETAGS}: FORCE |
| 158 | ${MAKE} -C ../lib-src $(notdir $@) | ||
| 159 | |||
| 160 | tagsfiles = $(wildcard ${srcdir}/*.[ch]) | ||
| 161 | |||
| 162 | FORCE: | ||
| 163 | .PHONY: tags FORCE | ||
| 164 | tags: TAGS | ||
| 165 | TAGS: ${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 | ||
| 652 | ETAGS = ../lib-src/etags | 652 | ETAGS = ../lib-src/etags${EXEEXT} |
| 653 | 653 | ||
| 654 | ctagsfiles1 = [xyzXYZ]*.[hc] | 654 | ${ETAGS}: FORCE |
| 655 | ctagsfiles2 = [a-wA-W]*.[hc] | 655 | ${MAKE} -C ../lib-src $(notdir $@) |
| 656 | ctagsfiles3 = [a-zA-Z]*.m | 656 | |
| 657 | ctagsfiles1 = $(wildcard ${srcdir}/*.[hc]) | ||
| 658 | ctagsfiles2 = $(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. |
| 663 | TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3) | 665 | TAGS: ${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 | ||
| 680 | tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS | 682 | tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS |