From: Sam Ravnborg Date: Fri, 8 Jun 2018 21:48:31 +0000 (+0200) Subject: kconfig: fix localmodconfig X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8593080c0fcf88a2140f63626319dcdd06127fa0;p=linux.git 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: 104daea149c4 ("kconfig: reference environment variables directly and remove 'option env='") Reported-by: Kevin Locke Reported-by: Andrei Vagin Signed-off-by: Sam Ravnborg Tested-by: Kevin Locke Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index a2e83ab17de3c..4686531e2f8ce 100755 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -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";