streamline_config.pl (b74b953b998bcc2db91b694446f3a2619ec32de6) streamline_config.pl (4908980b241bc639b71ef47b727b4bc7c0174afe)
1#!/usr/bin/perl -w
2#
3# Copywrite 2005-2009 - Steven Rostedt
4# Licensed under the terms of the GNU GPL License version 2
5#
6# It's simple enough to figure out how this works.
7# If not, then you can ask me at stripconfig@goodmis.org
8#

--- 123 unchanged lines hidden (view full) ---

132
133sub read_kconfig {
134 my ($kconfig) = @_;
135
136 my $state = "NONE";
137 my $config;
138 my @kconfigs;
139
1#!/usr/bin/perl -w
2#
3# Copywrite 2005-2009 - Steven Rostedt
4# Licensed under the terms of the GNU GPL License version 2
5#
6# It's simple enough to figure out how this works.
7# If not, then you can ask me at stripconfig@goodmis.org
8#

--- 123 unchanged lines hidden (view full) ---

132
133sub read_kconfig {
134 my ($kconfig) = @_;
135
136 my $state = "NONE";
137 my $config;
138 my @kconfigs;
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>) {
142 chomp;
143
144 # collect any Kconfig sources
145 if (/^source\s*"(.*)"/) {
146 $kconfigs[$#kconfigs+1] = $1;
147 }
148

--- 274 unchanged lines hidden ---
151 while (<KIN>) {
152 chomp;
153
154 # collect any Kconfig sources
155 if (/^source\s*"(.*)"/) {
156 $kconfigs[$#kconfigs+1] = $1;
157 }
158

--- 274 unchanged lines hidden ---