diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2011-07-20 00:40:09 -0400 |
---|---|---|
committer | Arnaud Lacombe <lacombar@gmail.com> | 2011-08-08 01:44:26 -0400 |
commit | 22d550ae83603aa8d64d72dd1e2309cd7a96ac89 (patch) | |
tree | 57952838dbc83d322a03bef2421596366991d8cd /scripts/kconfig/streamline_config.pl | |
parent | f597a718296eef9622ebc1d13f4f8324fa169cef (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.pl | 14 |
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 | # |
45 | use strict; | 45 | use strict; |
46 | use Getopt::Long; | ||
46 | 47 | ||
47 | my $config = ".config"; | 48 | my $config = ".config"; |
48 | 49 | ||
@@ -112,6 +113,13 @@ sub find_config { | |||
112 | 113 | ||
113 | find_config; | 114 | find_config; |
114 | 115 | ||
116 | # Parse options | ||
117 | my $localmodconfig = 0; | ||
118 | my $localyesconfig = 0; | ||
119 | |||
120 | GetOptions("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) |
116 | my $ksource = $ARGV[0]; | 124 | my $ksource = $ARGV[0]; |
117 | my $kconfig = $ARGV[1]; | 125 | my $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; |