You will need to display the value of the environment variable in the configuration symbol using the "env" option, as shown below:
config ENV_VAR
string
option env = "ENV_VAR"
if ENV_VAR = "foo"
source "foo_file"
endif
, $- 'source' , . -
source "foo/$ENV_VAR/Kconfig"
config ENV_VAR_SYM
string
option env="ENV_VAR"
source "foo/$ENV_VAR_SYM/Kconfig"
(ENV_VAR_SYM, , ENV_VAR, , .)
. Kconfig .
( Kconfiglib Kconfiglib, Kconfig.)