Skip to content

Commit

Permalink
kconfig: fix localmodconfig
Browse files Browse the repository at this point in the history
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: 104daea ("kconfig: reference environment variables directly and remove 'option env='")
Reported-by: Kevin Locke <kevin@kevinlocke.name>
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Kevin Locke <kevin@kevinlocke.name>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
sravnborg authored and masahir0y committed Jun 11, 2018
1 parent 2c4da1a commit 8593080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 8593080

Please sign in to comment.