diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 27 insertions, 17 deletions
@@ -1273,6 +1273,31 @@ define all-defconfigs | |||
1273 | $(call find-sources,'defconfig') | 1273 | $(call find-sources,'defconfig') |
1274 | endef | 1274 | endef |
1275 | 1275 | ||
1276 | define xtags | ||
1277 | if $1 --version 2>&1 | grep -iq exuberant; then \ | ||
1278 | $(all-sources) | xargs $1 -a \ | ||
1279 | -I __initdata,__exitdata,__acquires,__releases \ | ||
1280 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | ||
1281 | --extra=+f --c-kinds=+px; \ | ||
1282 | $(all-kconfigs) | xargs $1 -a \ | ||
1283 | --langdef=kconfig \ | ||
1284 | --language-force=kconfig \ | ||
1285 | --regex-kconfig='/^[[:blank:]]*config[[:blank:]]+([[:alnum:]_]+)/\1/'; \ | ||
1286 | $(all-defconfigs) | xargs $1 -a \ | ||
1287 | --langdef=dotconfig \ | ||
1288 | --language-force=dotconfig \ | ||
1289 | --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \ | ||
1290 | elif $1 --version 2>&1 | grep -iq emacs; then \ | ||
1291 | $(all-sources) | xargs $1 -a; \ | ||
1292 | $(all-kconfigs) | xargs $1 -a \ | ||
1293 | --regex='/^[ \t]*config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ | ||
1294 | $(all-defconfigs) | xargs $1 -a \ | ||
1295 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ | ||
1296 | else \ | ||
1297 | $(all-sources) | xargs $1 -a; \ | ||
1298 | fi | ||
1299 | endef | ||
1300 | |||
1276 | quiet_cmd_cscope-file = FILELST cscope.files | 1301 | quiet_cmd_cscope-file = FILELST cscope.files |
1277 | cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files | 1302 | cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files |
1278 | 1303 | ||
@@ -1286,31 +1311,16 @@ cscope: FORCE | |||
1286 | quiet_cmd_TAGS = MAKE $@ | 1311 | quiet_cmd_TAGS = MAKE $@ |
1287 | define cmd_TAGS | 1312 | define cmd_TAGS |
1288 | rm -f $@; \ | 1313 | rm -f $@; \ |
1289 | ETAGSF=`etags --version | grep -i exuberant >/dev/null && \ | 1314 | $(call xtags,etags) |
1290 | echo "-I __initdata,__exitdata,__acquires,__releases \ | ||
1291 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | ||
1292 | --extra=+f --c-kinds=+px"`; \ | ||
1293 | $(all-sources) | xargs etags $$ETAGSF -a; \ | ||
1294 | if test "x$$ETAGSF" = x; then \ | ||
1295 | $(all-kconfigs) | xargs etags -a \ | ||
1296 | --regex='/^config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ | ||
1297 | $(all-defconfigs) | xargs etags -a \ | ||
1298 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ | ||
1299 | fi | ||
1300 | endef | 1315 | endef |
1301 | 1316 | ||
1302 | TAGS: FORCE | 1317 | TAGS: FORCE |
1303 | $(call cmd,TAGS) | 1318 | $(call cmd,TAGS) |
1304 | 1319 | ||
1305 | |||
1306 | quiet_cmd_tags = MAKE $@ | 1320 | quiet_cmd_tags = MAKE $@ |
1307 | define cmd_tags | 1321 | define cmd_tags |
1308 | rm -f $@; \ | 1322 | rm -f $@; \ |
1309 | CTAGSF=`ctags --version | grep -i exuberant >/dev/null && \ | 1323 | $(call xtags,ctags) |
1310 | echo "-I __initdata,__exitdata,__acquires,__releases \ | ||
1311 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | ||
1312 | --extra=+f --c-kinds=+px"`; \ | ||
1313 | $(all-sources) | xargs ctags $$CTAGSF -a | ||
1314 | endef | 1324 | endef |
1315 | 1325 | ||
1316 | tags: FORCE | 1326 | tags: FORCE |