Exuberant ctags can tag file names too. I find this extremely useful
when browsing kernel source, and so would like to share it with
everyone. (You can now type ":tag oprof.c" for example, and jump to the
file with that name.)
I previously sent a patch which naively just appended an "--extra=+f" to
the ctags line. Here's a much smarter patch that works by first
querrying if ctags is exuberant, and if so, whether the --extra
functionality is available before adding the line. Please apply.
Signed-off-by: John Kacur [email protected]
--- Makefile.orig 2005-03-08 23:34:16.000000000 -0500
+++ Makefile 2005-03-09 20:25:06.710159432 -0500
@@ -1167,12 +1167,13 @@
cmd_TAGS = $(all-sources) | etags -
# Exuberant ctags works better with -I
-
+# Exuberant ctags can tag file names with --extra=+f
quiet_cmd_tags = MAKE $@
define cmd_tags
rm -f $@; \
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I
__initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \
- $(all-sources) | xargs ctags $$CTAGSF -a
+ CTAGSF=`ctags --version | grep -iq exuberant && echo "-I
__initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \
+ CTAGSF_EXTRA=`ctags --version | grep -iq exuberant && ctags --help |
grep -q "\--extra" && echo "--extra=+f"`; \
+ $(all-sources) | xargs ctags $$CTAGSF -a $$CTAGSF_EXTRA
endef
TAGS: FORCE
This second patch is a trivial spelling correction. Please apply
Signed-off-by: John Kacur [email protected]
--- Makefile.orig 2005-03-08 23:34:16.000000000 -0500
+++ Makefile 2005-03-09 20:26:29.063639800 -0500
@@ -18,7 +18,7 @@
#
# Most importantly: sub-Makefiles should only ever modify files in
# their own directory. If in some directory we have a dependency on
-# a file in another dir (which doesn't happen often, but it's of
+# a file in another dir (which doesn't happen often, but it's often
# unavoidable when linking the built-in.o targets which finally
# turn into vmlinux), we will call a sub make in that other dir, and
# after that we are sure that everything which is in that other dir
Kai, your e-mail address which I found in the list is different than the
one listed in the MAINTAINERS file.
On Wed, Mar 09, 2005 at 09:01:08PM -0500, John Kacur wrote:
> Exuberant ctags can tag file names too. I find this extremely useful
> when browsing kernel source, and so would like to share it with
> everyone. (You can now type ":tag oprof.c" for example, and jump to the
> file with that name.)
>
> I previously sent a patch which naively just appended an "--extra=+f" to
> the ctags line. Here's a much smarter patch that works by first
> querrying if ctags is exuberant, and if so, whether the --extra
> functionality is available before adding the line. Please apply.
> Signed-off-by: John Kacur [email protected]
I already applied your original patch (end of January) but only this week
it hit Linus' tree.
I think ctags users will just upgrade if their ctgs does not support
--extra=+f.
At least I will await and see if anyone complains before applying this
patch (btw. line wrapped)
Sam
On Mar 14, 2005 21:09 +0100, Sam Ravnborg wrote:
> I already applied your original patch (end of January) but only this week
> it hit Linus' tree.
> I think ctags users will just upgrade if their ctgs does not support
> --extra=+f.
I have ctags-5.4.2 (24 Jan 2003) and it has the --extra=+f support, so
I doubt it will hurt many people to make it default.
Cheers, Andreas
--
Andreas Dilger
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/