Re: [RFC PATCH 2/3] kconfig: allow to choose the shell for $(shell ) functions

From: Bagas Sanjaya
Date: Fri Aug 19 2022 - 04:59:11 EST


On 8/19/22 13:56, Masahiro Yamada wrote:
> GNU Make uses /bin/sh by default for running recipe lines and $(shell )
> functions. You can change the shell by setting the 'SHELL' variable.
> Unlike most variables, 'SHELL' is never set from the environment. [1]
>
> Currently, Kconfig does not provide any way to change the default shell.
> /bin/sh is always used for running $(shell,...) because do_shell() is
> implemented by using popen(3).
>
> This commit allows users to change the shell for Kconfig in a similar
> way to GNU Make; you can set the 'SHELL' variable in a Kconfig file to
> override the default shell. It is not taken from the environment. The
> change is effective only for $(shell,...) invocations called after the
> 'SHELL' assignment.
>

Hmmm...

Can we say that if we run SHELL=/bin/bash make nconfig, Kconfig will use
$SHELL but we can't set it as environment variable?

--
An old man doll... just what I always wanted! - Clara