diff options
| -rw-r--r-- | Makefile | 34 |
1 files changed, 25 insertions, 9 deletions
| @@ -1192,25 +1192,35 @@ endif | |||
| 1192 | 1192 | ||
| 1193 | ALLSOURCE_ARCHS := $(ARCH) | 1193 | ALLSOURCE_ARCHS := $(ARCH) |
| 1194 | 1194 | ||
| 1195 | define all-sources | 1195 | define 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 ) |
| 1214 | endef | ||
| 1215 | |||
| 1216 | define all-sources | ||
| 1217 | $(call find-sources,'*.[chS]') | ||
| 1218 | endef | ||
| 1219 | define all-kconfigs | ||
| 1220 | $(call find-sources,'Kconfig*') | ||
| 1221 | endef | ||
| 1222 | define all-defconfigs | ||
| 1223 | $(call find-sources,'defconfig') | ||
| 1214 | endef | 1224 | endef |
| 1215 | 1225 | ||
| 1216 | quiet_cmd_cscope-file = FILELST cscope.files | 1226 | quiet_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 | ||
| 1234 | endef | 1250 | endef |
| 1235 | 1251 | ||
| 1236 | TAGS: FORCE | 1252 | TAGS: FORCE |
