Add a ''tags'' target for ctags, just like the kernel has. I use this all the time... Signed-off-by: Rik van Riel <riel@redhat.com> --- xen-unstable/xen/Makefile.tags 2005-03-28 15:11:00.000000000 -0500 +++ xen-unstable/xen/Makefile 2005-03-28 15:11:25.000000000 -0500 @@ -103,7 +103,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h echo ""; \ echo "#endif") <$< >$@ -.PHONY: default debug install dist clean delete-unfresh-files TAGS +.PHONY: default debug install dist clean delete-unfresh-files TAGS tags SUBDIRS = arch common drivers TAGS: @@ -111,5 +111,10 @@ TAGS: find include -type d \( -name "asm-*" -o -name config \) -prune -o \ -name ''*.h'' -print; \ find $(SUBDIRS) -name ''*.[chS]'' ) | grep -v /SCCS/ | etags - +tags: + ( find include/asm-$(TARGET_ARCH) -name ''*.h''; \ + find include -type d \( -name "asm-*" -o -name config \) -prune -o \ + -name ''*.h'' -print; \ + find $(SUBDIRS) -name ''*.[chS]'' ) | grep -v /SCCS/ | xargs ctags MAP: nm $(TARGET) | grep -v ''\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)'' | sort > System.map _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 28 Mar 2005, at 21:54, Rik van Riel wrote:> Add a ''tags'' target for ctags, just like the kernel has. I use > this all the time...There''s already a TAGS target that does just about the same thing, except it invokes ''etags -'' rather than ''xargs ctags''. Do we really need both? And, if so, can they share the find expression? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rik van Riel
2005-Mar-28 21:33 UTC
Re: [Xen-devel] [PATCH] add a ''tags'' target for ctags
On Mon, 28 Mar 2005, Keir Fraser wrote:> On 28 Mar 2005, at 21:54, Rik van Riel wrote: > > > Add a ''tags'' target for ctags, just like the kernel has. I use > > this all the time... > > There''s already a TAGS target that does just about the same thing, > except it invokes ''etags -'' rather than ''xargs ctags''. Do we really need > both? And, if so, can they share the find expression?Sharing the find expression sounds like a good idea. If the one tag could invoke either etags or ctags, that would work fine for me - however, the editor I use understands ctags tags files, and I don''t have etags installed... -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel