* [PATCH v3] scripts/tags.sh: Fix the Kconfig tags generation when using latest ctags
@ 2023-01-28 6:49 Kevin Hao
0 siblings, 0 replies; only message in thread
From: Kevin Hao @ 2023-01-28 6:49 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Cc: Cristian Ciocaltea, Greg Kroah-Hartman, Nicolas Schier,
Vipin Sharma, Paulo Miguel Almeida, Masahiro Yamada
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.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
v3: Add Reviewed-by from Cristian.
Hi Andrew,
The scripts/get_maintainer.pl can't tell me who own scripts/tags.sh, and
the v2 [1] has dangled in the list for almost one month without further
comment. So I am wondering if you could pick up this patch.
[1] https://lore.kernel.org/all/20221230025632.1053726-1-haokexin@gmail.com/
scripts/tags.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 14d0209893e9..da4d404cd1f0 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -271,10 +271,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()
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-28 6:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28 6:49 [PATCH v3] scripts/tags.sh: Fix the Kconfig tags generation when using latest ctags Kevin Hao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®