public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: Have make TAGS not include structure members
@ 2013-11-15 14:36 Steven Rostedt
  2013-11-16  1:02 ` Stephen Boyd
  2013-11-17  9:14 ` Geert Uytterhoeven
  0 siblings, 2 replies; 16+ messages in thread
From: Steven Rostedt @ 2013-11-15 14:36 UTC (permalink / raw)
  To: LKML; +Cc: Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton

It is really annoying when I use emacs TAGS to search for something
like "dev_name" and have to go through 12 iterations before I find the
function "dev_name". I really do not care about structures that include
"dev_name" as one of its fields, and I'm sure pretty much all other
developers do not care either.

There's a "remove_structs" variable used by the scripts/tags.sh, which
I'm guessing is suppose to remove these structures from the TAGS file,
but it must do a poor job at it, as I'm always hitting structures when
I want the actual declaration.

Luckily, the etags and ctags program comes with an option
"--no-members", which does exactly what I want, and I'm sure all other
kernel developers want too.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 74f02e4..b985371 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -218,7 +218,7 @@ exuberant()
 
 emacs()
 {
-	all_target_sources | xargs $1 -a                        \
+	all_target_sources | xargs $1 -a --no-members           \
 	--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/'         \
 	--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/'   \
 	--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/'		\
@@ -248,13 +248,13 @@ emacs()
 	--regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \
 	--regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'
 
-	all_kconfigs | xargs $1 -a                              \
+	all_kconfigs | xargs $1 -a --no-members                 \
 	--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
 
-	all_kconfigs | xargs $1 -a                              \
+	all_kconfigs | xargs $1 -a --no-members                 \
 	--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/'
 
-	all_defconfigs | xargs -r $1 -a                         \
+	all_defconfigs | xargs -r $1 -a --no-members            \
 	--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'
 }
 

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

end of thread, other threads:[~2014-01-06 19:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 14:36 [PATCH] scripts: Have make TAGS not include structure members Steven Rostedt
2013-11-16  1:02 ` Stephen Boyd
2013-11-16  1:20   ` Steven Rostedt
2013-11-17  9:14 ` Geert Uytterhoeven
2013-11-17 14:27   ` Steven Rostedt
2013-11-17 15:19     ` Geert Uytterhoeven
2013-11-17 17:08       ` Steven Rostedt
2013-11-20  8:29         ` Geert Uytterhoeven
2013-11-19 23:59   ` Andrew Morton
2013-11-20  0:04     ` Steven Rostedt
2013-11-20  0:08       ` Andrew Morton
2013-11-20  0:14         ` Steven Rostedt
2013-11-20  0:18           ` Stephen Boyd
2013-11-20  0:34             ` Steven Rostedt
2014-01-03 13:24               ` mmarek
2014-01-06 19:32                 ` Steven Rostedt

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