Commit f4ed1009fcea8502d1191ef3e435e9d83c286b80
Committed by
Michal Marek
1 parent
38b3439d84
Exists in
master
and in
4 other branches
kbuild: add GNU GLOBAL tags generation
GNU GLOBAL (http://www.gnu.org/software/global/) is a source code tagging system It is really cheap to support it in kbuild system. Signed-off-by: Jianbin Kang <kjbmail@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Showing 2 changed files with 13 additions and 3 deletions Side-by-side Diff
Makefile
... | ... | @@ -420,7 +420,7 @@ |
420 | 420 | # of make so .config is not included in this case either (for *config). |
421 | 421 | |
422 | 422 | no-dot-config-targets := clean mrproper distclean \ |
423 | - cscope TAGS tags help %docs check% coccicheck \ | |
423 | + cscope gtags TAGS tags help %docs check% coccicheck \ | |
424 | 424 | include/linux/version.h headers_% \ |
425 | 425 | kernelversion %src-pkg |
426 | 426 | |
... | ... | @@ -1134,7 +1134,7 @@ |
1134 | 1134 | MRPROPER_DIRS += include/config usr/include include/generated |
1135 | 1135 | MRPROPER_FILES += .config .config.old .version .old_version \ |
1136 | 1136 | include/linux/version.h \ |
1137 | - Module.symvers tags TAGS cscope* | |
1137 | + Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS | |
1138 | 1138 | |
1139 | 1139 | # clean - Delete most, but leave enough to build external modules |
1140 | 1140 | # |
... | ... | @@ -1221,6 +1221,7 @@ |
1221 | 1221 | @echo ' modules_prepare - Set up for building external modules' |
1222 | 1222 | @echo ' tags/TAGS - Generate tags file for editors' |
1223 | 1223 | @echo ' cscope - Generate cscope index' |
1224 | + @echo ' gtags - Generate GNU GLOBAL index' | |
1224 | 1225 | @echo ' kernelrelease - Output the release version string' |
1225 | 1226 | @echo ' kernelversion - Output the version stored in Makefile' |
1226 | 1227 | @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ |
... | ... | @@ -1379,7 +1380,7 @@ |
1379 | 1380 | quiet_cmd_tags = GEN $@ |
1380 | 1381 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ |
1381 | 1382 | |
1382 | -tags TAGS cscope: FORCE | |
1383 | +tags TAGS cscope gtags: FORCE | |
1383 | 1384 | $(call cmd,tags) |
1384 | 1385 | |
1385 | 1386 | # Scripts to check various things for consistency |
scripts/tags.sh
... | ... | @@ -114,6 +114,11 @@ |
114 | 114 | cscope -b -f cscope.out |
115 | 115 | } |
116 | 116 | |
117 | +dogtags() | |
118 | +{ | |
119 | + all_sources | gtags -f - | |
120 | +} | |
121 | + | |
117 | 122 | exuberant() |
118 | 123 | { |
119 | 124 | all_sources | xargs $1 -a \ |
... | ... | @@ -183,6 +188,10 @@ |
183 | 188 | case "$1" in |
184 | 189 | "cscope") |
185 | 190 | docscope |
191 | + ;; | |
192 | + | |
193 | + "gtags") | |
194 | + dogtags | |
186 | 195 | ;; |
187 | 196 | |
188 | 197 | "tags") |