summaryrefslogtreecommitdiff
path: root/scripts/tags.sh
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-01-28 14:49:16 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-02-02 22:50:10 -0800
commit21773790a77284777ab538203d1ba16a352b5909 (patch)
treecb1beed582af05d417dd2d40f0951934a758438f /scripts/tags.sh
parent602ce7b8e1343b19c0cf93a3dd1926838ac5a1cc (diff)
scripts/tags.sh: fix the Kconfig tags generation when using latest ctags
The Kconfig language has already been built-in in the latest ctags, so it would error exit if we try to define it as an user-defined language via '--langdef=kconfig'. This results that there is no Kconfig tags in the final tag file. Fix this by skipping the user Kconfig definition for the latest ctags. Link: https://lkml.kernel.org/r/20230128064916.912744-1-haokexin@gmail.com Signed-off-by: Kevin Hao <haokexin@gmail.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Cc: Vipin Sharma <vipinsh@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/tags.sh')
-rwxr-xr-xscripts/tags.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh
index e137cf15aae9..84775f08260f 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -264,10 +264,12 @@ exuberant()
--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
"${regex[@]}"
- setup_regex exuberant kconfig
- all_kconfigs | xargs $1 -a \
- --langdef=kconfig --language-force=kconfig "${regex[@]}"
-
+ KCONFIG_ARGS=()
+ if ! $1 --list-languages | grep -iq kconfig; then
+ setup_regex exuberant kconfig
+ KCONFIG_ARGS=(--langdef=kconfig --language-force=kconfig "${regex[@]}")
+ fi
+ all_kconfigs | xargs $1 -a "${KCONFIG_ARGS[@]}"
}
emacs()