Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8593080c authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Masahiro Yamada
Browse files

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: default avatarKevin Locke <kevin@kevinlocke.name>
Reported-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Tested-by: default avatarKevin Locke <kevin@kevinlocke.name>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 2c4da1a7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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";