diff options
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index c70a27d924f0..cc10bcfda64f 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl | |||
@@ -137,7 +137,17 @@ sub read_kconfig { | |||
137 | my $config; | 137 | my $config; |
138 | my @kconfigs; | 138 | my @kconfigs; |
139 | 139 | ||
140 | open(KIN, "$ksource/$kconfig") || die "Can't open $kconfig"; | 140 | my $source = "$ksource/$kconfig"; |
141 | my $last_source = ""; | ||
142 | |||
143 | # Check for any environment variables used | ||
144 | while ($source =~ /\$(\w+)/ && $last_source ne $source) { | ||
145 | my $env = $1; | ||
146 | $last_source = $source; | ||
147 | $source =~ s/\$$env/$ENV{$env}/; | ||
148 | } | ||
149 | |||
150 | open(KIN, "$source") || die "Can't open $kconfig"; | ||
141 | while (<KIN>) { | 151 | while (<KIN>) { |
142 | chomp; | 152 | chomp; |
143 | 153 | ||