From 8593080c0fcf88a2140f63626319dcdd06127fa0 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Fri, 8 Jun 2018 23:48:31 +0200 Subject: 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 --- scripts/kconfig/streamline_config.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index a2e83ab17de3..4686531e2f8c 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"; -- cgit v1.2.3