Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180870
b: refs/heads/master
c: 13d7e93
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jan 6, 2010
1 parent 5abc8ad commit 70212ae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17263baf958b7ab1d8c60445f412a1080362c88c
refs/heads/master: 13d7e9385644d376a0816ad663ba3dfc45359f2f
26 changes: 26 additions & 0 deletions trunk/scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ sub find_config {
my %objects;
my $var;
my $cont = 0;
my $iflevel = 0;
my @ifdeps;

# prevent recursion
my %read_kconfigs;
Expand All @@ -146,6 +148,15 @@ sub read_kconfig {
$state = "NEW";
$config = $1;

for (my $i = 0; $i < $iflevel; $i++) {
if ($i) {
$depends{$config} .= " " . $ifdeps[$i];
} else {
$depends{$config} = $ifdeps[$i];
}
$state = "DEP";
}

# collect the depends for the config
} elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) {
$state = "DEP";
Expand All @@ -166,6 +177,21 @@ sub read_kconfig {
# note if the config has a prompt
$prompt{$config} = 1;

# Check for if statements
} elsif (/^if\s+(.*\S)\s*$/) {
my $deps = $1;
# remove beginning and ending non text
$deps =~ s/^[^a-zA-Z0-9_]*//;
$deps =~ s/[^a-zA-Z0-9_]*$//;

my @deps = split /[^a-zA-Z0-9_]+/, $deps;

$ifdeps[$iflevel++] = join ':', @deps;

} elsif (/^endif/) {

$iflevel-- if ($iflevel);

# stop on "help"
} elsif (/^\s*help\s*$/) {
$state = "NONE";
Expand Down

0 comments on commit 70212ae

Please sign in to comment.