From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Kevin Hao <haokexin@gmail.com>, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vipin Sharma <vipinsh@google.com>
Subject: Re: [PATCH] scripts/tags.sh: Fix the Kconfig tags generation when using latest ctags
Date: Thu, 29 Dec 2022 14:33:15 +0200 [thread overview]
Message-ID: <5e1b0401-db1e-a7a4-787c-4b93d02f5b73@collabora.com> (raw)
In-Reply-To: <20221229055401.855185-1-haokexin@gmail.com>
On 12/29/22 07:54, Kevin Hao wrote:
> 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>
> ---
> scripts/tags.sh | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index e137cf15aae9..c56b13ae3fdf 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
> }
The 'regex' array needs quoting to prevent word splitting/globbing. I
would suggest to transform 'KCONFIG_ARGS' into an array as well:
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()
next prev parent reply other threads:[~2022-12-29 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 5:54 Kevin Hao
2022-12-29 12:33 ` Cristian Ciocaltea [this message]
2022-12-30 2:56 ` Kevin Hao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e1b0401-db1e-a7a4-787c-4b93d02f5b73@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=haokexin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vipinsh@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®