aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/streamline_config.pl
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2011-07-20 00:40:09 -0400
committerArnaud Lacombe <lacombar@gmail.com>2011-08-08 01:44:26 -0400
commit22d550ae83603aa8d64d72dd1e2309cd7a96ac89 (patch)
tree57952838dbc83d322a03bef2421596366991d8cd /scripts/kconfig/streamline_config.pl
parentf597a718296eef9622ebc1d13f4f8324fa169cef (diff)
kconfig/streamline_config.pl: use options to determine operating mode
The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts/kconfig/streamline_config.pl')
-rw-r--r--scripts/kconfig/streamline_config.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index ae34d2007f57..ec7afce4c88d 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -43,6 +43,7 @@
43# make oldconfig 43# make oldconfig
44# 44#
45use strict; 45use strict;
46use Getopt::Long;
46 47
47my $config = ".config"; 48my $config = ".config";
48 49
@@ -112,6 +113,13 @@ sub find_config {
112 113
113find_config; 114find_config;
114 115
116# Parse options
117my $localmodconfig = 0;
118my $localyesconfig = 0;
119
120GetOptions("localmodconfig" => \$localmodconfig,
121 "localyesconfig" => \$localyesconfig);
122
115# Get the build source and top level Kconfig file (passed in) 123# Get the build source and top level Kconfig file (passed in)
116my $ksource = $ARGV[0]; 124my $ksource = $ARGV[0];
117my $kconfig = $ARGV[1]; 125my $kconfig = $ARGV[1];
@@ -425,7 +433,11 @@ while(<CIN>) {
425 433
426 if (/^(CONFIG.*)=(m|y)/) { 434 if (/^(CONFIG.*)=(m|y)/) {
427 if (defined($configs{$1})) { 435 if (defined($configs{$1})) {
428 $setconfigs{$1} = $2; 436 if ($localyesconfig) {
437 $setconfigs{$1} = 'y';
438 } else {
439 $setconfigs{$1} = $2;
440 }
429 } elsif ($2 eq "m") { 441 } elsif ($2 eq "m") {
430 print "# $1 is not set\n"; 442 print "# $1 is not set\n";
431 next; 443 next;