aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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