From c835a482e12c05467470842000c25c22681aa7bd Mon Sep 17 00:00:00 2001
From: tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 4 Mar 2003 21:48:53 +0000
Subject: [PATCH] 	* doc/sourcebuild.texi (Front End Directory): Document
 tags. 	* configure: Rebuilt. 	* configure.in (target_list): Added tags. 
 * Makefile.in (TAGS): Depend on lang.clean.  Include subdirectory 	TAGS
 files by reference. 	* objc/Make-lang.in (objc.tags): New target.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63808 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog            |  9 +++++++++
 gcc/Makefile.in          | 18 ++++++++++++------
 gcc/configure            |  2 +-
 gcc/configure.in         |  2 +-
 gcc/doc/sourcebuild.texi |  5 ++++-
 gcc/objc/Make-lang.in    |  3 +++
 6 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 79e0741e5d3e..7b0adc10b0c6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2003-03-04  Tom Tromey  <tromey@redhat.com>
+
+	* doc/sourcebuild.texi (Front End Directory): Document tags.
+	* configure: Rebuilt.
+	* configure.in (target_list): Added tags.
+	* Makefile.in (TAGS): Depend on lang.clean.  Include subdirectory
+	TAGS files by reference.
+	* objc/Make-lang.in (objc.tags): New target.
+
 2003-03-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
 	* gcov-io.h (gcov_save_position, gcov_reserve_length, gcov_resync,
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index c48d619077cd..e09d9ceeb473 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3378,12 +3378,18 @@ paranoia: paranoia.o real.o $(LIBIBERTY)
 # These exist for maintenance purposes.
 
 # Update the tags table.
-TAGS: force
-	(cd $(srcdir);							\
-	mkdir tmp-tags;							\
-	mv -f c-parse.[ch] =*.[chy] tmp-tags;				\
-	etags *.y *.h *.c;						\
-	mv tmp-tags/* .;						\
+TAGS: lang.tags
+	(cd $(srcdir);						     \
+	incs= ;							     \
+	list='$(SUBDIRS)'; for dir in $$list; do		     \
+	  if test -f $$dir/TAGS; then				     \
+	    incs="$$incs --include $$dir/TAGS";			     \
+	  fi;							     \
+	done;							     \
+	mkdir tmp-tags;						     \
+	mv -f c-parse.[ch] =*.[chy] tmp-tags;			     \
+	etags *.y *.h *.c $$incs;				     \
+	mv tmp-tags/* .;					     \
 	rmdir tmp-tags)
 
 # A list of files to be destroyed during "lean" builds.
diff --git a/gcc/configure b/gcc/configure
index fe71c2a63c6a..6c9ffe2598c1 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -8913,7 +8913,7 @@ done
 
 rm -f Make-hooks
 touch Make-hooks
-target_list="all.build all.cross start.encap rest.encap \
+target_list="all.build all.cross start.encap rest.encap tags \
 	info dvi generated-manpages \
 	install-normal install-common install-info install-man \
 	uninstall \
diff --git a/gcc/configure.in b/gcc/configure.in
index fa9cab394b09..a13f03585c72 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -2814,7 +2814,7 @@ done
 
 rm -f Make-hooks
 touch Make-hooks
-target_list="all.build all.cross start.encap rest.encap \
+target_list="all.build all.cross start.encap rest.encap tags \
 	info dvi generated-manpages \
 	install-normal install-common install-info install-man \
 	uninstall \
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index f10a800862bc..3141a23d7e7a 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2002 Free Software Foundation, Inc.
+@c Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -539,6 +539,9 @@ deprecated).
 @itemx start.encap
 @itemx rest.encap
 FIXME: exactly what goes in each of these targets?
+@item tags
+Build an @command{etags} @file{TAGS} file in the language subdirectory
+in the source tree.
 @item info
 Build info documentation for the front end, in the source directory.
 This target is only called by @command{make bootstrap} if a suitable
diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in
index 1b06b38f460d..6c5acd6cd595 100644
--- a/gcc/objc/Make-lang.in
+++ b/gcc/objc/Make-lang.in
@@ -101,6 +101,9 @@ objc.all.cross:
 objc.start.encap:
 objc.rest.encap:
 
+objc.tags: force
+	cd $(srcdir)/objc; etags *.y *.c *.h
+
 objc.info:
 objc.dvi:
 objc.generated-manpages:
-- 
GitLab