Commit 4908980b authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

kconfig: Make localmodconfig handle environment variables

The commit 838a2e55
 kbuild: migrate all arch to the kconfig mainmenu upgrade

Broke make localmodconfig. The reason was that it added a
environment variable to the kconfig source, which the
streamline_config.pl could not handle.

This patch changes streamline_config.pl to handle kconfig sources
using environment variables in their names.

Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 18cb657c
...@@ -137,7 +137,17 @@ sub read_kconfig { ...@@ -137,7 +137,17 @@ sub read_kconfig {
my $config; my $config;
my @kconfigs; my @kconfigs;
open(KIN, "$ksource/$kconfig") || die "Can't open $kconfig"; my $source = "$ksource/$kconfig";
my $last_source = "";
# Check for any environment variables used
while ($source =~ /\$(\w+)/ && $last_source ne $source) {
my $env = $1;
$last_source = $source;
$source =~ s/\$$env/$ENV{$env}/;
}
open(KIN, "$source") || die "Can't open $kconfig";
while (<KIN>) { while (<KIN>) {
chomp; chomp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment