Commit c617f3d0 authored by Glenn Morris's avatar Glenn Morris

Use relative filenames in TAGS files.

* src/Makefile.in (abs_srcdir): Remove it again.
(.PHONY): Remove frc.
(maintainer-clean): No more TAGS-LISP file.
(TAGS): Pass relative file names to etags.
(../lisp/TAGS): Rename from TAGS-LISP.  Work in ../lisp.

* lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4, TAGS): Use relative file names.
(TAGS-LISP): Remove.
(maintainer-clean): No more TAGS-LISP file.

* lwlib/Makefile.in (abs_srcdir): Remove it again.
(ctagsfiles, TAGS): Use relative filenames.

* .bzrignore: Remove TAGS-LISP.
parent 739f57cd
2013-11-02 Glenn Morris <rgm@gnu.org> 2013-11-02 Glenn Morris <rgm@gnu.org>
Use relative filenames in TAGS files.
* Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4, TAGS): Use relative file names.
(TAGS-LISP): Remove.
(maintainer-clean): No more TAGS-LISP file.
* Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3) * Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
(lisptagsfiles4): Use absolute filenames again. (lisptagsfiles4): Use absolute filenames again.
(TAGS, TAGS-LISP): Not everything needs to run in one line. (TAGS, TAGS-LISP): Not everything needs to run in one line.
......
...@@ -214,25 +214,25 @@ update-authors: ...@@ -214,25 +214,25 @@ update-authors:
ETAGS = ../lib-src/etags ETAGS = ../lib-src/etags
## NB We use absolute filenames because ../src/Makefile calls this via lisptagsfiles1 = $(srcdir)/*.el
## make -f ../lisp/Makefile. lisptagsfiles2 = $(srcdir)/*/*.el
## FIXME? Can etags work ok with relative filenames? lisptagsfiles3 = $(srcdir)/*/*/*.el
lisptagsfiles1 = $(abs_srcdir)/*.el lisptagsfiles4 = $(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 ## Apparently the echo | sed | xargs is to stop the command line
## getting too long on MS Windows. It will make no difference on ## getting too long on MS Windows. It will make no difference on
## POSIX systems, where the shell does the globbing right away, before ## POSIX systems, where the shell does the globbing right away, before
## passing the expanded arguments to echo. ## passing the expanded arguments to echo.
TAGS TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) ## The POSIX way would be 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)
rm -f $@ rm -f $@
touch $@ touch $@
echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | \ echo $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4) | \
sed -e 's,$(abs_srcdir)/[^ ]*loaddefs[^ ]*,,g' \ sed -e 's,$(srcdir)/[^ ]*loaddefs[^ ]*,,g' \
-e 's,$(abs_srcdir)/ldefs-boot[^ ]*,,' \ -e 's,$(srcdir)/ldefs-boot[^ ]*,,' \
-e 's,$(abs_srcdir)/[^ ]*esh-groups.el[^ ]*,,' | \ -e 's,$(srcdir)/[^ ]*esh-groups.el[^ ]*,,' | \
xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@ xargs $(XARGS_LIMIT) "$(ETAGS)" -a -o $@
...@@ -458,7 +458,7 @@ distclean: ...@@ -458,7 +458,7 @@ distclean:
-rm -f ./Makefile $(lisp)/loaddefs.el~ -rm -f ./Makefile $(lisp)/loaddefs.el~
maintainer-clean: distclean bootstrap-clean maintainer-clean: distclean bootstrap-clean
rm -f TAGS TAGS-LISP rm -f TAGS
.PHONY: check-declare .PHONY: check-declare
......
2013-11-02 Glenn Morris <rgm@gnu.org> 2013-11-02 Glenn Morris <rgm@gnu.org>
Use relative filenames in TAGS files.
* Makefile.in (abs_srcdir): Remove it again.
(ctagsfiles, TAGS): Use relative filenames.
* Makefile.in (abs_srcdir): New, set by configure. * Makefile.in (abs_srcdir): New, set by configure.
(ETAGS, ctagsfiles): New variables. (ETAGS, ctagsfiles): New variables.
(TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again. (TAGS): Use ETAGS, ctagsfiles. Use absolute filenames again.
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# and set up to be configured by ../configure. # and set up to be configured by ../configure.
srcdir=@srcdir@ srcdir=@srcdir@
abs_srcdir=@abs_srcdir@
# MinGW CPPFLAGS may use this. # MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@ abs_top_srcdir=@abs_top_srcdir@
VPATH=@srcdir@ VPATH=@srcdir@
...@@ -104,12 +103,10 @@ maintainer-clean: distclean ...@@ -104,12 +103,10 @@ maintainer-clean: distclean
ETAGS = ../lib-src/etags ETAGS = ../lib-src/etags
## FIXME? Does etags need to use absolute filenames? ctagsfiles= $(srcdir)/*.[ch]
## See comments in lisp/Makefile.in, src/Makefile.in.
ctagsfiles= *.[ch]
TAGS: $(srcdir)/$(ctagsfiles) TAGS: $(ctagsfiles)
"$(ETAGS)" "$(abs_srcdir)"/$(ctagsfiles) "$(ETAGS)" $(ctagsfiles)
tags: TAGS tags: TAGS
.PHONY: tags .PHONY: tags
......
2013-11-02 Glenn Morris <rgm@gnu.org> 2013-11-02 Glenn Morris <rgm@gnu.org>
Use relative filenames in TAGS files.
* Makefile.in (abs_srcdir): Remove it again.
(.PHONY): Remove frc.
(maintainer-clean): No more TAGS-LISP file.
(TAGS): Pass relative file names to etags.
(../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
* Makefile.in (abs_srcdir): New, set by configure. * Makefile.in (abs_srcdir): New, set by configure.
(lispdir): Remove. (lispdir): Remove.
(maintainer-clean): Remove pointless echo. That should be in the (maintainer-clean): Remove pointless echo. That should be in the
......
### @configure_input@ ### @configure_input@
# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2013 Free Software # Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2013
# Foundation, Inc. # Free Software Foundation, Inc.
# This file is part of GNU Emacs. # This file is part of GNU Emacs.
...@@ -28,7 +28,6 @@ SHELL = @SHELL@ ...@@ -28,7 +28,6 @@ SHELL = @SHELL@
# Here are the things that we expect ../configure to edit. # Here are the things that we expect ../configure to edit.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir = @srcdir@ srcdir = @srcdir@
abs_srcdir = @abs_srcdir@
# MinGW CPPFLAGS may use this. # MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@ abs_top_srcdir=@abs_top_srcdir@
ntsource = $(srcdir)/../nt ntsource = $(srcdir)/../nt
...@@ -557,7 +556,7 @@ ns-app: emacs$(EXEEXT) ...@@ -557,7 +556,7 @@ ns-app: emacs$(EXEEXT)
cd ../nextstep && $(MAKE) $(MFLAGS) all cd ../nextstep && $(MAKE) $(MFLAGS) all
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
.PHONY: versionclean extraclean frc .PHONY: versionclean extraclean
mostlyclean: mostlyclean:
rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a
...@@ -585,7 +584,7 @@ distclean: bootstrap-clean ...@@ -585,7 +584,7 @@ distclean: bootstrap-clean
rm -f Makefile rm -f Makefile
maintainer-clean: distclean maintainer-clean: distclean
rm -f TAGS TAGS-LISP rm -f TAGS
versionclean: versionclean:
-rm -f emacs$(EXEEXT) emacs-*.*.*$(EXEEXT) ../etc/DOC* -rm -f emacs$(EXEEXT) emacs-*.*.*$(EXEEXT) ../etc/DOC*
extraclean: distclean extraclean: distclean
...@@ -598,28 +597,27 @@ ctagsfiles1 = [xyzXYZ]*.[hc] ...@@ -598,28 +597,27 @@ ctagsfiles1 = [xyzXYZ]*.[hc]
ctagsfiles2 = [a-wA-W]*.[hc] ctagsfiles2 = [a-wA-W]*.[hc]
ctagsfiles3 = [a-zA-Z]*.m ctagsfiles3 = [a-zA-Z]*.m
## FIXME? Do we really need to use absolute filenames here? ## 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: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3)
"$(ETAGS)" --include=TAGS-LISP --include=$(lwlibdir)/TAGS \ "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
--regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \ --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
"$(abs_srcdir)"/$(ctagsfiles1) "$(abs_srcdir)"/$(ctagsfiles2) \ $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \
--regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \ --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
"$(abs_srcdir)"/$(ctagsfiles3) $(srcdir)/$(ctagsfiles3)
## 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.
frc: ../lisp/TAGS:
TAGS-LISP: frc cd ../lisp && $(MAKE) TAGS ETAGS="$(ETAGS)"
$(MAKE) -f ../lisp/Makefile TAGS-LISP ETAGS="$(ETAGS)"
$(lwlibdir)/TAGS: $(lwlibdir)/TAGS:
cd $(lwlibdir) && $(MAKE) TAGS ETAGS="$(ETAGS)" cd $(lwlibdir) && $(MAKE) TAGS ETAGS="$(ETAGS)"
tags: TAGS TAGS-LISP $(lwlibdir)/TAGS tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
.PHONY: 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