Skip to content

Commit 8593080

Browse files
sravnborgmasahir0y
authored andcommitted
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: 104daea ("kconfig: reference environment variables directly and remove 'option env='") Reported-by: Kevin Locke <[email protected]> Reported-by: Andrei Vagin <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Tested-by: Kevin Locke <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 2c4da1a commit 8593080

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/kconfig/streamline_config.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ sub read_kconfig {
165165
my $last_source = "";
166166

167167
# Check for any environment variables used
168-
while ($source =~ /\$(\w+)/ && $last_source ne $source) {
168+
while ($source =~ /\$\((\w+)\)/ && $last_source ne $source) {
169169
my $env = $1;
170170
$last_source = $source;
171-
$source =~ s/\$$env/$ENV{$env}/;
171+
$source =~ s/\$\($env\)/$ENV{$env}/;
172172
}
173173

174174
open(my $kinfile, '<', $source) || die "Can't open $kconfig";

0 commit comments

Comments
 (0)