Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319808
b: refs/heads/master
c: 4503379
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jun 19, 2012
1 parent 27655db commit b683ca1
Show file tree
Hide file tree
Showing 2 changed files with 22 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: d4bb58b5cb3b6fbf89d0012c199be3954cba9fb3
refs/heads/master: 4503379cb811809470ebefb58c943fe605bc3e29
21 changes: 21 additions & 0 deletions trunk/scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
use strict;
use Getopt::Long;

# set the environment variable LOCALMODCONFIG_DEBUG to get
# debug output.
my $debugprint = 0;
$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG}));

sub dprint {
return if (!$debugprint);
print STDERR @_;
}

my $config = ".config";

my $uname = `uname -r`;
Expand Down Expand Up @@ -389,6 +399,7 @@ sub convert_vars {
my @arr = @{$objects{$module}};
foreach my $conf (@arr) {
$configs{$conf} = $module;
dprint "$conf added by direct ($module)\n";
}
} else {
# Most likely, someone has a custom (binary?) module loaded.
Expand All @@ -412,6 +423,8 @@ sub convert_vars {

my $repeat = 1;

my $depconfig;

#
# Note, we do not care about operands (like: &&, ||, !) we want to add any
# config that is in the depend list of another config. This script does
Expand Down Expand Up @@ -440,6 +453,7 @@ sub parse_config_depends
# We must make sure that this config has its
# dependencies met.
$repeat = 1; # do again
dprint "$conf selected by depend $depconfig\n";
$configs{$conf} = 1;
}
} else {
Expand Down Expand Up @@ -473,15 +487,18 @@ sub parse_config_selects

# Make sure that this config exists in the current .config file
if (!defined($orig_configs{$conf})) {
dprint "$conf not set for $config select\n";
next;
}

# Check if something other than a module selects this config
if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") {
dprint "$conf (non module) selects config, we are good\n";
# we are good with this
return;
}
if (defined($configs{$conf})) {
dprint "$conf selects $config so we are good\n";
# A set config selects this config, we are good
return;
}
Expand All @@ -506,6 +523,7 @@ sub parse_config_selects
$repeat = 1;
# Make this config need to be selected
$configs{$next_config} = 1;
dprint "$next_config selected by select $config\n";
}

my %process_selects;
Expand All @@ -526,6 +544,7 @@ sub loop_depend {
}

$config =~ s/^CONFIG_//;
$depconfig = $config;

if (defined($depends{$config})) {
# This config has dependencies. Make sure they are also included
Expand All @@ -546,6 +565,8 @@ sub loop_select {
foreach my $config (keys %process_selects) {
$config =~ s/^CONFIG_//;

dprint "Process select $config\n";

# config has no prompt and must be selected.
parse_config_selects $config, $selects{$config};
}
Expand Down

0 comments on commit b683ca1

Please sign in to comment.