Commit 8593080c authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Masahiro Yamada

kconfig: fix localmodconfig

When kconfig syntax moved to use $(FOO) for environment variables
localmodconfig was not updated.
Fix so it now works with the new syntax $(FOO)

Fixes: 104daea1 ("kconfig: reference environment variables directly and remove 'option env='")
Reported-by: default avatarKevin Locke <kevin@kevinlocke.name>
Reported-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Tested-by: default avatarKevin Locke <kevin@kevinlocke.name>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 2c4da1a7
......@@ -165,10 +165,10 @@ sub read_kconfig {
my $last_source = "";
# Check for any environment variables used
while ($source =~ /\$(\w+)/ && $last_source ne $source) {
while ($source =~ /\$\((\w+)\)/ && $last_source ne $source) {
my $env = $1;
$last_source = $source;
$source =~ s/\$$env/$ENV{$env}/;
$source =~ s/\$\($env\)/$ENV{$env}/;
}
open(my $kinfile, '<', $source) || die "Can't open $kconfig";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment