Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319806
b: refs/heads/master
c: 4f4c51c
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jun 19, 2012
1 parent f7b07d7 commit c1b6f37
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b58a99eb27aa522a3cd16ece09c8045b322b9ce
refs/heads/master: 4f4c51c9405a509e9073ff242746e9049c723aae
26 changes: 24 additions & 2 deletions trunk/scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ sub find_config {

find_config;

# Read in the entire config file into config_file
my @config_file = <CIN>;
close CIN;

# Parse options
my $localmodconfig = 0;
my $localyesconfig = 0;
Expand Down Expand Up @@ -392,7 +396,20 @@ sub convert_vars {
}
}

# Read the current config, and see what is enabled. We want to
# ignore configs that we would not enable anyway.

my %orig_configs;
my $valid = "A-Za-z_0-9";

foreach my $line (@config_file) {
$_ = $line;

if (/(CONFIG_[$valid]*)=(m|y)/) {
$orig_configs{$1} = $2;
}
}

my $repeat = 1;

#
Expand All @@ -414,6 +431,11 @@ sub parse_config_dep_select

$p =~ s/^[^$valid]*[$valid]+//;

# We only need to process if the depend config is a module
if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") {
next;
}

if (!defined($configs{$conf})) {
# We must make sure that this config has its
# dependencies met.
Expand Down Expand Up @@ -450,7 +472,8 @@ sub parse_config_dep_select

# Finally, read the .config file and turn off any module enabled that
# we could not find a reason to keep enabled.
while(<CIN>) {
foreach my $line (@config_file) {
$_ = $line;

if (/CONFIG_IKCONFIG/) {
if (/# CONFIG_IKCONFIG is not set/) {
Expand Down Expand Up @@ -478,7 +501,6 @@ sub parse_config_dep_select
}
print;
}
close(CIN);

# Integrity check, make sure all modules that we want enabled do
# indeed have their configs set.
Expand Down

0 comments on commit c1b6f37

Please sign in to comment.