public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Exuberant ctags can tag files names too
@ 2005-03-10  2:01 John Kacur
  2005-03-14 20:09 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: John Kacur @ 2005-03-10  2:01 UTC (permalink / raw)
  To: sam, kai.germaschewski; +Cc: linux-kernel

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 jkacur@rogers.com

--- 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 jkacur@rogers.com

--- 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exuberant ctags can tag files names too
  2005-03-10  2:01 Exuberant ctags can tag files names too John Kacur
@ 2005-03-14 20:09 ` Sam Ravnborg
  2005-03-14 20:44   ` Andreas Dilger
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2005-03-14 20:09 UTC (permalink / raw)
  To: John Kacur; +Cc: kai.germaschewski, linux-kernel

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 jkacur@rogers.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exuberant ctags can tag files names too
  2005-03-14 20:09 ` Sam Ravnborg
@ 2005-03-14 20:44   ` Andreas Dilger
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Dilger @ 2005-03-14 20:44 UTC (permalink / raw)
  To: John Kacur, kai.germaschewski, linux-kernel

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/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-14 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10  2:01 Exuberant ctags can tag files names too John Kacur
2005-03-14 20:09 ` Sam Ravnborg
2005-03-14 20:44   ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox