aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasatake YAMATO <jet@gyve.org>2006-06-21 23:21:20 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-24 17:52:05 -0400
commite838db685fcfd2e9a0548ffc5cb9447e6c3c11be (patch)
tree980366e83c7bf2c9ece3f0ad77eb62dc8ee8fbc5 /Makefile
parent6803dc0ea85ad21b2cb3ec88decff5e27d7a390b (diff)
kbuild: adding symbols in Kconfig and defconfig to TAGS
I'm using TAGS generated from "make TAGS" to read the kernel source code. When I met a ifdef block #ifdef CONFIG_FOO ... #endif in the soruce code I would like to know the meaning CONFIG_FOO to decide whether I should read inside the ifdef block or not. meaning CONFIG_FOO is well documented in Kconfig. So it is nice if I can jump to CONFIG_FOO entry in Kconfig from "#ifdef CONFIG_FOO" with the tag jump. Here is the patch to add symbols in Kconfig and defconfig to TAGS in "make TAGS" operation. Signed-off-by: Masatake YAMATO <jet@gyve.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 25 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index e8906694dcc5..a21c3192e8c9 100644
--- a/Makefile
+++ b/Makefile
@@ -1192,25 +1192,35 @@ endif
1192 1192
1193ALLSOURCE_ARCHS := $(ARCH) 1193ALLSOURCE_ARCHS := $(ARCH)
1194 1194
1195define all-sources 1195define find-sources
1196 ( find $(__srctree) $(RCS_FIND_IGNORE) \ 1196 ( find $(__srctree) $(RCS_FIND_IGNORE) \
1197 \( -name include -o -name arch \) -prune -o \ 1197 \( -name include -o -name arch \) -prune -o \
1198 -name '*.[chS]' -print; \ 1198 -name $1 -print; \
1199 for ARCH in $(ALLSOURCE_ARCHS) ; do \ 1199 for ARCH in $(ALLSOURCE_ARCHS) ; do \
1200 find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \ 1200 find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
1201 -name '*.[chS]' -print; \ 1201 -name $1 -print; \
1202 done ; \ 1202 done ; \
1203 find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ 1203 find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
1204 -name '*.[chS]' -print; \ 1204 -name $1 -print; \
1205 find $(__srctree)include $(RCS_FIND_IGNORE) \ 1205 find $(__srctree)include $(RCS_FIND_IGNORE) \
1206 \( -name config -o -name 'asm-*' \) -prune \ 1206 \( -name config -o -name 'asm-*' \) -prune \
1207 -o -name '*.[chS]' -print; \ 1207 -o -name $1 -print; \
1208 for ARCH in $(ALLINCLUDE_ARCHS) ; do \ 1208 for ARCH in $(ALLINCLUDE_ARCHS) ; do \
1209 find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \ 1209 find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
1210 -name '*.[chS]' -print; \ 1210 -name $1 -print; \
1211 done ; \ 1211 done ; \
1212 find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ 1212 find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
1213 -name '*.[chS]' -print ) 1213 -name $1 -print )
1214endef
1215
1216define all-sources
1217 $(call find-sources,'*.[chS]')
1218endef
1219define all-kconfigs
1220 $(call find-sources,'Kconfig*')
1221endef
1222define all-defconfigs
1223 $(call find-sources,'defconfig')
1214endef 1224endef
1215 1225
1216quiet_cmd_cscope-file = FILELST cscope.files 1226quiet_cmd_cscope-file = FILELST cscope.files
@@ -1230,7 +1240,13 @@ define cmd_TAGS
1230 echo "-I __initdata,__exitdata,__acquires,__releases \ 1240 echo "-I __initdata,__exitdata,__acquires,__releases \
1231 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 1241 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
1232 --extra=+f --c-kinds=+px"`; \ 1242 --extra=+f --c-kinds=+px"`; \
1233 $(all-sources) | xargs etags $$ETAGSF -a 1243 $(all-sources) | xargs etags $$ETAGSF -a; \
1244 if test "x$$ETAGSF" = x; then \
1245 $(all-kconfigs) | xargs etags -a \
1246 --regex='/^config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \
1247 $(all-defconfigs) | xargs etags -a \
1248 --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
1249 fi
1234endef 1250endef
1235 1251
1236TAGS: FORCE 1252TAGS: FORCE