diff mbox

Include tags file for generated source files

Message ID BANLkTikfXaotF7s2T-adYeH9FRabkcigtw@mail.gmail.com
State New
Headers show

Commit Message

Mingjie Xing June 21, 2011, 10:05 a.m. UTC
Hi,

This small patch build and include tags file for generated source
files under $(objdir).  This is helpful to browse source files using
TAGS.  Tested on my i686-pc-linux-gnu machine.

Is it OK?

Thanks,
Mingjie

2011-06-21  Mingjie Xing  <mingjie.xing@gmail.com>

        * Makefile.in (TAGS): Add new object obj.tags, include tags file
        for generated source files under $(objdir).
diff mbox

Patch

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 175074)
+++ Makefile.in	(working copy)
@@ -5201,8 +5201,13 @@  paranoia: paranoia.o real.o $(LIBIBERTY)
 
 # These exist for maintenance purposes.
 
+# Update the tags for generated source files.
+obj.tags: force
+	(etags -o TAGS.sub *.h *.c;			\
+	etags --include TAGS.sub)
+
 # Update the tags table.
-TAGS: lang.tags
+TAGS: lang.tags obj.tags
 	(cd $(srcdir);					\
 	incs= ;						\
 	list='$(SUBDIRS)'; for dir in $$list; do	\
@@ -5211,7 +5216,7 @@  TAGS: lang.tags
 	  fi;						\
 	done;						\
 	etags -o TAGS.sub c-family/*.h c-family/*.c *.h *.c; \
-	etags --include TAGS.sub $$incs)
+	etags --include TAGS.sub $$incs --include $(objdir)/TAGS.sub)
 
 # -----------------------------------------------------
 # Rules for generating translated message descriptions.