提交 8593080c 编写于 作者: S Sam Ravnborg 提交者: 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: NKevin Locke <kevin@kevinlocke.name>
Reported-by: NAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
Tested-by: NKevin Locke <kevin@kevinlocke.name>
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 2c4da1a7
...@@ -165,10 +165,10 @@ sub read_kconfig { ...@@ -165,10 +165,10 @@ sub read_kconfig {
my $last_source = ""; my $last_source = "";
# Check for any environment variables used # Check for any environment variables used
while ($source =~ /\$(\w+)/ && $last_source ne $source) { while ($source =~ /\$\((\w+)\)/ && $last_source ne $source) {
my $env = $1; my $env = $1;
$last_source = $source; $last_source = $source;
$source =~ s/\$$env/$ENV{$env}/; $source =~ s/\$\($env\)/$ENV{$env}/;
} }
open(my $kinfile, '<', $source) || die "Can't open $kconfig"; open(my $kinfile, '<', $source) || die "Can't open $kconfig";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册