From: Petr Vorel <petr.vorel@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
m.patzlaff@pilz.de, afshin.nasser@gmail.com,
angelo.compagnucci@gmail.com,
Arnout Vandecappelle <arnout@mind.be>,
Matthew Weber <matthew.weber@rockwellcollins.com>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH 1/1] merge_config.sh: Replace prefix CONFIG_ with any prefix
Date: Mon, 29 Oct 2018 16:40:07 +0100 [thread overview]
Message-ID: <20181029154006.GC14084@x230> (raw)
In-Reply-To: <CAK7LNARccwZNM=4jOEoHNiZ-x4FrzNDG6uZtEXhQMA0z7Pnunw@mail.gmail.com>
Hi Masahiro,
thanks for a quick review and patch.
> I'd like to filter "CONFIG_", "BR2_", or whatever specified prefix.
> Some fragment files (e.g. arch/x86/configs/xen.config)
> have comment lines.
> Matching '# ' + arbitrary string
> might hit comment lines accidentally.
Make sense.
> The kconfig binary checks the environment variable 'CONFIG_'
> to override the default prefix:
> https://github.com/torvalds/linux/blob/v4.19/scripts/kconfig/lkc.h#L28
What a crazy variable name. But we're not going to change it.
> For similarity, how about doing in the same way in merge_config.sh ?
Make sense to keep the same approach.
> Does the following work for you ?
> (you can pass CONFIG_=BR2_ to merge_config.sh)
Patch is good (with one note bellow).
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Could you push your patch into your tree?
Or going to post a patch? If not here is mine:
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index 67d1314..391ee6c 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -90,6 +90,10 @@ if [ -z "$KCONFIG_CONFIG" ]; then
> fi
> fi
> +# Check the environment variable "CONFIG_" for the config option prefix.
> +# If unset, the default is "CONFIG_".
> +: ${CONFIG_=CONFIG_}
Although I guess this could be less cryptic:
CONFIG_="${CONFIG_:-CONFIG_}"
but too verbose, so I'm for your variant.
...
> MERGE_LIST=$*
> -SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
> +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_}[a-zA-Z0-9_]*\)[= ].*/\2/p"
> TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
Kind regards,
Petr
next prev parent reply other threads:[~2018-10-30 0:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 12:55 [PATCH 1/1] merge_config.sh: Replace prefix CONFIG_ with any prefix Petr Vorel
2018-10-29 15:22 ` Masahiro Yamada
2018-10-29 15:40 ` Petr Vorel [this message]
2018-10-29 16:22 ` Masahiro Yamada
2018-10-29 18:27 ` Petr Vorel
2018-10-29 19:18 ` Masahiro Yamada
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=20181029154006.GC14084@x230 \
--to=petr.vorel@gmail.com \
--cc=afshin.nasser@gmail.com \
--cc=angelo.compagnucci@gmail.com \
--cc=arnout@mind.be \
--cc=john.stultz@linaro.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=m.patzlaff@pilz.de \
--cc=matthew.weber@rockwellcollins.com \
--cc=yamada.masahiro@socionext.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