mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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.
This commit is contained in:
parent
efa8087d4b
commit
c6d3c60f28
6 changed files with 62 additions and 34 deletions
|
|
@ -345,9 +345,12 @@ extraclean: maintainer-clean
|
||||||
check:
|
check:
|
||||||
@echo "We don't have any tests for the lib-src/ directory yet."
|
@echo "We don't have any tests for the lib-src/ directory yet."
|
||||||
|
|
||||||
|
tagsfiles = $(wildcard ${srcdir}/*.[ch])
|
||||||
|
|
||||||
|
.PHONY: tags
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
TAGS: etags${EXEEXT}
|
TAGS: etags${EXEEXT} ${tagsfiles}
|
||||||
etags *.[ch]
|
./etags ${tagsfiles}
|
||||||
|
|
||||||
../lib/libgnu.a: $(config_h)
|
../lib/libgnu.a: $(config_h)
|
||||||
$(MAKE) -C ../lib all
|
$(MAKE) -C ../lib all
|
||||||
|
|
|
||||||
|
|
@ -220,26 +220,28 @@ update-authors:
|
||||||
$(emacs) -L "$(top_srcdir)/admin" -l authors \
|
$(emacs) -L "$(top_srcdir)/admin" -l authors \
|
||||||
-f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)"
|
-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
|
ETAGS = ../lib-src/etags${EXEEXT}
|
||||||
lisptagsfiles2 = $(srcdir)/*/*.el
|
|
||||||
lisptagsfiles3 = $(srcdir)/*/*/*.el
|
${ETAGS}: FORCE
|
||||||
lisptagsfiles4 = $(srcdir)/*/*/*/*.el
|
${MAKE} -C ../lib-src $(notdir $@)
|
||||||
|
|
||||||
## The ls | sed | xargs is to stop the command line getting too long
|
## 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
|
## 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
|
## 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
|
## compile-main. But maybe this is not even necessary any more now
|
||||||
## that this uses relative filenames.
|
## that this uses relative filenames.
|
||||||
TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
|
TAGS: ${ETAGS} ${tagsfiles}
|
||||||
rm -f $@
|
rm -f $@
|
||||||
touch $@
|
touch $@
|
||||||
ls $(lisptagsfiles1) $(lisptagsfiles2) \
|
ls ${tagsfiles} | xargs $(XARGS_LIMIT) "${ETAGS}" -a -o $@
|
||||||
$(lisptagsfiles3) $(lisptagsfiles4) | \
|
|
||||||
sed -e '/loaddefs/d; /\/ldefs-boot/d; /esh-groups\.el/d' | \
|
|
||||||
xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
|
|
||||||
|
|
||||||
|
|
||||||
# The src/Makefile.in has its own set of dependencies and when they decide
|
# The src/Makefile.in has its own set of dependencies and when they decide
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ RANLIB=@RANLIB@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ARFLAGS = @ARFLAGS@
|
ARFLAGS = @ARFLAGS@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
|
||||||
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
|
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
|
||||||
MOTIF_OBJS = lwlib-Xm.o
|
MOTIF_OBJS = lwlib-Xm.o
|
||||||
|
|
@ -128,15 +129,17 @@ distclean: clean
|
||||||
bootstrap-clean maintainer-clean: distclean
|
bootstrap-clean maintainer-clean: distclean
|
||||||
rm -f TAGS
|
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)
|
FORCE:
|
||||||
"$(ETAGS)" $(ctagsfiles)
|
.PHONY: tags FORCE
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
.PHONY: tags
|
TAGS: ${ETAGS} $(ctagsfiles)
|
||||||
|
${ETAGS} $(ctagsfiles)
|
||||||
|
|
||||||
### Makefile.in ends here
|
### Makefile.in ends here
|
||||||
|
|
|
||||||
|
|
@ -225,9 +225,18 @@ extraclean: maintainer-clean
|
||||||
check:
|
check:
|
||||||
@echo "We don't have any tests for the nt/ directory yet."
|
@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: TAGS
|
||||||
TAGS: ${EXE_FILES:${EXEEXT}=.c}
|
TAGS: ${ETAGS} ${tagsfiles}
|
||||||
../lib-src/etags *.[ch]
|
${ETAGS} ${tagsfiles}
|
||||||
|
|
||||||
## Build the programs
|
## Build the programs
|
||||||
addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
|
addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,12 @@ CC=@CC@
|
||||||
CFLAGS=@CFLAGS@
|
CFLAGS=@CFLAGS@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
||||||
TAGS = etags
|
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ARFLAGS = @ARFLAGS@
|
ARFLAGS = @ARFLAGS@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
|
||||||
OBJS = Activate.o \
|
OBJS = Activate.o \
|
||||||
AddPane.o \
|
AddPane.o \
|
||||||
|
|
@ -152,8 +152,17 @@ clean mostlyclean:
|
||||||
bootstrap-clean maintainer-clean distclean: clean
|
bootstrap-clean maintainer-clean distclean: clean
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
|
|
||||||
.PHONY: tags
|
ETAGS = ../lib-src/etags${EXEEXT}
|
||||||
tags:
|
|
||||||
$(TAGS) -t *.[ch]
|
${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
|
### Makefile.in ends here
|
||||||
|
|
|
||||||
|
|
@ -649,32 +649,34 @@ extraclean: distclean
|
||||||
-rm -f *~ \#*
|
-rm -f *~ \#*
|
||||||
|
|
||||||
|
|
||||||
ETAGS = ../lib-src/etags
|
ETAGS = ../lib-src/etags${EXEEXT}
|
||||||
|
|
||||||
ctagsfiles1 = [xyzXYZ]*.[hc]
|
${ETAGS}: FORCE
|
||||||
ctagsfiles2 = [a-wA-W]*.[hc]
|
${MAKE} -C ../lib-src $(notdir $@)
|
||||||
ctagsfiles3 = [a-zA-Z]*.m
|
|
||||||
|
ctagsfiles1 = $(wildcard ${srcdir}/*.[hc])
|
||||||
|
ctagsfiles2 = $(wildcard ${srcdir}/*.m)
|
||||||
|
|
||||||
## FIXME? In out-of-tree builds, should TAGS be generated in srcdir?
|
## FIXME? In out-of-tree builds, should TAGS be generated in srcdir?
|
||||||
|
|
||||||
## This does not need to depend on ../lisp and ../lwlib TAGS files,
|
## This does not need to depend on ../lisp and ../lwlib TAGS files,
|
||||||
## because etags "--include" only includes a pointer to the file,
|
## because etags "--include" only includes a pointer to the file,
|
||||||
## rather than the file contents.
|
## rather than the file contents.
|
||||||
TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3)
|
TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2)
|
||||||
"$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
|
${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
|
||||||
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
|
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
|
||||||
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\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_ (]+"\([^"]+\)"/\1/' \
|
||||||
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
|
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
|
||||||
$(srcdir)/$(ctagsfiles3)
|
$(ctagsfiles2)
|
||||||
|
|
||||||
## Arrange to make tags tables for ../lisp and ../lwlib,
|
## Arrange to make tags tables for ../lisp and ../lwlib,
|
||||||
## which the above TAGS file for the C files includes by reference.
|
## which the above TAGS file for the C files includes by reference.
|
||||||
../lisp/TAGS:
|
../lisp/TAGS: FORCE
|
||||||
$(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
|
$(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
|
||||||
|
|
||||||
$(lwlibdir)/TAGS:
|
$(lwlibdir)/TAGS: FORCE
|
||||||
$(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
|
$(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
|
||||||
|
|
||||||
tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
|
tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue