From: Kevin Hao Date: Sat, 28 Jan 2023 06:49:16 +0000 (+0800) Subject: scripts/tags.sh: fix the Kconfig tags generation when using latest ctags X-Git-Tag: v6.3-rc1~112^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21773790a77284777ab538203d1ba16a352b5909;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Cristian Ciocaltea Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Nicolas Schier Cc: Paulo Miguel Almeida Cc: Vipin Sharma Signed-off-by: Andrew Morton --- diff --git a/scripts/tags.sh b/scripts/tags.sh index e137cf15aae9d..84775f08260f3 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()