* [patch] Include tags file for generated source files
@ 2011-06-21 10:17 Mingjie Xing
0 siblings, 0 replies; only message in thread
From: Mingjie Xing @ 2011-06-21 10:17 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
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).
[-- Attachment #2: foo.patch --]
[-- Type: text/x-patch, Size: 883 bytes --]
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-21 10:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 10:17 [patch] Include tags file for generated source files Mingjie Xing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).