Skip to content

Commit

Permalink
kconfig: Make localmodconfig handle environment variables
Browse files Browse the repository at this point in the history
The commit 838a2e5
 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 <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Michal Marek <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
Steven Rostedt authored and rostedt committed Oct 29, 2010
1 parent 18cb657 commit 4908980
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,17 @@ sub read_kconfig {
my $config;
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>) {
chomp;

Expand Down

0 comments on commit 4908980

Please sign in to comment.