Commit b0b9e592 authored by Glenn Morris's avatar Glenn Morris

Small Makefile cleanup mainly related to tags file generation

* src/Makefile.in (abs_srcdir): New, set by configure.
(maintainer-clean): Remove pointless echo.  That should be in the
top-level Makefile, if anywhere.  Delete TAGS-LISP.
(extraclean): No s/ and m/ directories for some time.
(TAGS): Remove no-longer-defined S_FILE.
Pass absolute filenames to etags once more.
(TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.

* lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line.
Remove all *loaddefs files, not just the first.  Remove esh-groups.
(maintainer-clean): Delete TAGS, TAGS-LISP.

* lwlib/Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles.  Use absolute filenames again.
parent 5246583b
2013-11-02 Glenn Morris <rgm@gnu.org>
* Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line.
Remove all *loaddefs files, not just the first. Remove esh-groups.
(maintainer-clean): Delete TAGS, TAGS-LISP.
2013-11-02 Bozhidar Batsov <bozhidar@batsov.com>
* emacs-lisp/package.el (package-version-join): Recognize
......
......@@ -49,12 +49,6 @@ BYTE_COMPILE_EXTRA_FLAGS =
# BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
# The example above is just for developers, it should not be used by default.
lisptagsfiles1 = $(lisp)/*.el
lisptagsfiles2 = $(lisp)/*/*.el
lisptagsfiles3 = $(lisp)/*/*/*.el
lisptagsfiles4 = $(lisp)/*/*/*/*.el
ETAGS = ../lib-src/etags
# Automatically generated autoload files, apart from lisp/loaddefs.el.
# Note this includes only those files that need special rules to
# build; ie it does not need to include things created via
......@@ -217,10 +211,30 @@ bzr-update: compile finder-data custom-deps
update-authors:
$(emacs) -l authors -f batch-update-authors $(top_srcdir)/etc/AUTHORS $(top_srcdir)
ETAGS = ../lib-src/etags
## NB We use absolute filenames because ../src/Makefile calls this via
## make -f ../lisp/Makefile.
## FIXME? Can etags work ok with relative filenames?
lisptagsfiles1 = $(abs_srcdir)/*.el
lisptagsfiles2 = $(abs_srcdir)/*/*.el
lisptagsfiles3 = $(abs_srcdir)/*/*/*.el
lisptagsfiles4 = $(abs_srcdir)/*/*/*/*.el
## Apparently the echo | sed | xargs is to stop the command line
## getting too long on MS Windows. It will make no difference on
## POSIX systems, where the shell does the globbing right away, before
## passing the expanded arguments to echo.
TAGS TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
rm -f $@; touch $@; \
echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | sed -e "s,$(lisp)/[^ ]*loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,," | \
xargs $(XARGS_LIMIT) ${ETAGS} -a -o $@
rm -f $@
touch $@
echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | \
sed -e 's,$(abs_srcdir)/[^ ]*loaddefs[^ ]*,,g' \
-e 's,$(abs_srcdir)/ldefs-boot[^ ]*,,' \
-e 's,$(abs_srcdir)/[^ ]*esh-groups.el[^ ]*,,' | \
xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
# The src/Makefile.in has its own set of dependencies and when they decide
# that one Lisp file needs to be re-compiled, we had better recompile it as
......@@ -444,6 +458,7 @@ distclean:
-rm -f ./Makefile $(lisp)/loaddefs.el~
maintainer-clean: distclean bootstrap-clean
rm -f TAGS TAGS-LISP
.PHONY: check-declare
......
2013-11-02 Glenn Morris <rgm@gnu.org>
* Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again.
2013-10-24 Glenn Morris <rgm@gnu.org>
* Makefile.in (abs_top_srcdir): New, set by configure.
......
......@@ -23,6 +23,7 @@
# and set up to be configured by ../configure.
srcdir=@srcdir@
abs_srcdir=@abs_srcdir@
# MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@
VPATH=@srcdir@
......@@ -100,7 +101,17 @@ distclean: clean
maintainer-clean: distclean
rm -f TAGS
TAGS:
../lib-src/etags $(srcdir)/*.[ch]
ETAGS = ../lib-src/etags
## FIXME? Does etags need to use absolute filenames?
## See comments in lisp/Makefile.in, src/Makefile.in.
ctagsfiles= *.[ch]
TAGS: $(srcdir)/$(ctagsfiles)
"$(ETAGS)" "$(abs_srcdir)"/$(ctagsfiles)
tags: TAGS
.PHONY: tags
### Makefile.in ends here
2013-11-02 Glenn Morris <rgm@gnu.org>
* Makefile.in (abs_srcdir): New, set by configure.
(maintainer-clean): Remove pointless echo. That should be in the
top-level Makefile, if anywhere. Delete TAGS-LISP.
(extraclean): No s/ and m/ directories for some time.
(TAGS): Remove no-longer-defined S_FILE.
Pass absolute filenames to etags once more.
(TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
* xfaces.c (check_lface_attrs, realize_default_face): Add
......
......@@ -28,6 +28,7 @@ SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir = @srcdir@
abs_srcdir = @abs_srcdir@
# MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@
ntsource = $(srcdir)/../nt
......@@ -580,38 +581,44 @@ bootstrap-clean: clean
if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \
else mv ./.gdbinit.save ./.gdbinit; fi; \
fi
## This is used in making a distribution.
## Do not use it on development directories!
distclean: bootstrap-clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f TAGS
rm -f TAGS TAGS-LISP
versionclean:
-rm -f emacs$(EXEEXT) emacs-*.*.*$(EXEEXT) ../etc/DOC*
extraclean: distclean
-rm -f *~ \#* m/?*~ s/?*~
-rm -f *~ \#*
## Arrange to make a tags table TAGS-LISP for ../lisp,
## plus TAGS for the C files, which includes ../lisp/TAGS by reference.
ETAGS = ../lib-src/etags
ctagsfiles1 = [xyzXYZ]*.[hc]
ctagsfiles2 = [a-wA-W]*.[hc]
ctagsfiles3 = [a-zA-Z]*.m
TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(S_FILE)
../lib-src/etags --include=TAGS-LISP --include=$(lwlibdir)/TAGS \
## FIXME? Do we really need to use absolute filenames here?
## 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=TAGS-LISP --include=$(lwlibdir)/TAGS \
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
$(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(S_FILE) \
"$(abs_srcdir)"/$(ctagsfiles1) "$(abs_srcdir)"/$(ctagsfiles2) \
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
$(srcdir)/$(ctagsfiles3)
"$(abs_srcdir)"/$(ctagsfiles3)
## Arrange to make tags tables for ../lisp and ../lwlib,
## which the above TAGS file for the C files includes by reference.
frc:
TAGS-LISP: frc
$(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS=../lib-src/etags
$(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS="$(ETAGS)"
$(lwlibdir)/TAGS:
(cd $(lwlibdir); $(MAKE) -f $(lwlibdir)/Makefile tags ETAGS=../lib-src/etags)
cd $(lwlibdir) && $(MAKE) TAGS ETAGS="$(ETAGS)"
tags: TAGS TAGS-LISP $(lwlibdir)/TAGS
.PHONY: tags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment