This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: better etags support


>>>>> "Joseph" == Joseph S Myers <jsm28@cam.ac.uk> writes:

Joseph> All the language hook targets need to be documented in
Joseph> sourcebuild.texi.

Thanks.  I looked for this but couldn't find it.
How about the appended?

Tom

Index: ChangeLog
from  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.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.993
diff -u -r1.993 Makefile.in
--- Makefile.in 12 Feb 2003 21:48:56 -0000 1.993
+++ Makefile.in 14 Feb 2003 19:12:26 -0000
@@ -3366,12 +3366,18 @@
 # 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.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.641
diff -u -r1.641 configure.in
--- configure.in 6 Feb 2003 01:47:55 -0000 1.641
+++ configure.in 14 Feb 2003 19:12:29 -0000
@@ -2710,7 +2710,7 @@
 
 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 \
Index: ada/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (ada.tags): New target.

Index: ada/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.25
diff -u -r1.25 Make-lang.in
--- ada/Make-lang.in 3 Feb 2003 00:55:32 -0000 1.25
+++ ada/Make-lang.in 14 Feb 2003 19:12:31 -0000
@@ -341,6 +341,9 @@
 
 ada.start.encap: 
 ada.rest.encap:
+
+ada.tags: force
+	cd $(srcdir)/ada; etags *.c *.h *.ads *.adb
 
 # Generate documentation.
 #
Index: cp/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (c++.tags): New target.

Index: cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.134
diff -u -r1.134 Make-lang.in
--- cp/Make-lang.in 13 Feb 2003 04:57:20 -0000 1.134
+++ cp/Make-lang.in 14 Feb 2003 19:12:37 -0000
@@ -113,6 +113,9 @@
 c++.start.encap: g++$(exeext)
 c++.rest.encap:
 
+c++.tags: force
+	cd $(srcdir)/cp; etags *.c *.h
+
 c++.info: 
 c++.dvi:
 c++.generated-manpages:
Index: doc/sourcebuild.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/sourcebuild.texi,v
retrieving revision 1.13
diff -u -r1.13 sourcebuild.texi
--- doc/sourcebuild.texi 17 Dec 2002 16:47:45 -0000 1.13
+++ doc/sourcebuild.texi 14 Feb 2003 19:12:37 -0000
@@ -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 @@
 @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
Index: f/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (f77.tags): New target.

Index: f/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/Make-lang.in,v
retrieving revision 1.119
diff -u -r1.119 Make-lang.in
--- f/Make-lang.in 21 Jan 2003 13:45:14 -0000 1.119
+++ f/Make-lang.in 14 Feb 2003 19:12:40 -0000
@@ -145,6 +145,9 @@
 f77.start.encap: g77$(exeext)
 f77.rest.encap:
 
+f77.tags: force
+	cd $(srcdir)/f; etags *.c *.h
+
 f77.info: $(srcdir)/f/g77.info
 f77.dvi: f/g77.dvi
 f77.generated-manpages: $(srcdir)/f/g77.1
Index: java/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (java.tags): New target.

Index: java/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.103
diff -u -r1.103 Make-lang.in
--- java/Make-lang.in 30 Jan 2003 05:19:31 -0000 1.103
+++ java/Make-lang.in 14 Feb 2003 19:12:46 -0000
@@ -156,6 +156,10 @@
 java.start.encap: $(GCJ)$(exeext)
 java.rest.encap:
 
+
+java.tags: force
+	cd $(srcdir)/java; etags *.y *.c *.h --language=none --regex='/DEFTREECODE [(]\([A-Z_]+\)/\1/' java-tree.def
+
 java.info: $(srcdir)/java/gcj.info
 java.dvi: java/gcj.dvi
 java.generated-manpages: $(srcdir)/java/gcj.1 $(srcdir)/java/gcjh.1 \
Index: objc/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/Make-lang.in,v
retrieving revision 1.55
diff -u -r1.55 Make-lang.in
--- objc/Make-lang.in 30 Jan 2003 05:17:55 -0000 1.55
+++ objc/Make-lang.in 14 Feb 2003 19:12:46 -0000
@@ -101,6 +101,9 @@
 objc.start.encap:
 objc.rest.encap:
 
+objc.tags: force
+	cd $(srcdir)/objc; etags *.y *.c *.h
+
 objc.info:
 objc.dvi:
 objc.generated-manpages:
Index: treelang/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (treelang.tags): New target.

Index: treelang/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/Make-lang.in,v
retrieving revision 1.12
diff -u -r1.12 Make-lang.in
--- treelang/Make-lang.in 26 Jan 2003 10:17:17 -0000 1.12
+++ treelang/Make-lang.in 14 Feb 2003 19:12:48 -0000
@@ -131,6 +131,9 @@
 treelang.start.encap:
 treelang.rest.encap:
 
+treelang.tags: force
+	cd $(srcdir)/treelang; etags *.y *.l *.c *.h
+
 .phony:treelang.info
 treelang.info: $(srcdir)/treelang/treelang.info
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]