Skip to contentSkip to conversation

Add ctag support for function prototypes and external variable declarations

PATCH In review John Kacur 2 participants 2 messages Oct 29, 2005 – Dec 25, 2005 Kbuild

lore
Share & tools
lore

John Kacur

author
#0 lore raw

PATCH 1/1 Add ctag support for function prototypes and external variable declarations

This patch adds function prototypes and external variable declarations to the set of tag kinds when running ctags. I find this useful when perusing the kernel. Please apply.

---
diff -u linux-2.6.14/Makefile{orig,}

Makefile renamed from Makefile.orig +2 -2
@@ -1227,7 +1227,7 @@
 quiet_cmd_TAGS = MAKE   $@
 define cmd_TAGS
 	rm -f $@; \
-	ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
+	ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f --c-kinds=+px"`; \
 	$(all-sources) | xargs etags $$ETAGSF -a
 endef
 
@@ -1238,7 +1238,7 @@
 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 --extra=+f"`; \
+	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f --c-kinds=+px"`; \
 	$(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
#1 lore raw
Quoted 4 lines · John Kacur

This patch adds function prototypes and external variable declarations to the set of tag kinds when running ctags. I find this useful when perusing the kernel. Please apply.

Apllied - thanks.

Sam