diff options
-rwxr-xr-x | scripts/tags.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh index 0bc8588b630f..0d6004e20658 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -166,9 +166,6 @@ exuberant() | |||
166 | all_defconfigs | xargs -r $1 -a \ | 166 | all_defconfigs | xargs -r $1 -a \ |
167 | --langdef=dotconfig --language-force=dotconfig \ | 167 | --langdef=dotconfig --language-force=dotconfig \ |
168 | --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/' | 168 | --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/' |
169 | |||
170 | # Remove structure forward declarations. | ||
171 | LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' tags | ||
172 | } | 169 | } |
173 | 170 | ||
174 | emacs() | 171 | emacs() |
@@ -233,6 +230,7 @@ if [ "${ARCH}" = "um" ]; then | |||
233 | fi | 230 | fi |
234 | fi | 231 | fi |
235 | 232 | ||
233 | remove_structs= | ||
236 | case "$1" in | 234 | case "$1" in |
237 | "cscope") | 235 | "cscope") |
238 | docscope | 236 | docscope |
@@ -245,10 +243,17 @@ case "$1" in | |||
245 | "tags") | 243 | "tags") |
246 | rm -f tags | 244 | rm -f tags |
247 | xtags ctags | 245 | xtags ctags |
246 | remove_structs=y | ||
248 | ;; | 247 | ;; |
249 | 248 | ||
250 | "TAGS") | 249 | "TAGS") |
251 | rm -f TAGS | 250 | rm -f TAGS |
252 | xtags etags | 251 | xtags etags |
252 | remove_structs=y | ||
253 | ;; | 253 | ;; |
254 | esac | 254 | esac |
255 | |||
256 | # Remove structure forward declarations. | ||
257 | if [ -n $remove_structs ]; then | ||
258 | LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1 | ||
259 | fi | ||