aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
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
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')
-rw-r--r--scripts/kconfig/Makefile4
-rw-r--r--scripts/kconfig/streamline_config.pl14
2 files changed, 15 insertions, 3 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index bd41ab29e680..4de89738827c 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -35,7 +35,7 @@ silentoldconfig: $(obj)/conf
35 35
36localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 36localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
37 $(Q)mkdir -p include/generated 37 $(Q)mkdir -p include/generated
38 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config 38 $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
39 $(Q)if [ -f .config ]; then \ 39 $(Q)if [ -f .config ]; then \
40 cmp -s .tmp.config .config || \ 40 cmp -s .tmp.config .config || \
41 (mv -f .config .config.old.1; \ 41 (mv -f .config .config.old.1; \
@@ -50,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
50 50
51localyesconfig: $(obj)/streamline_config.pl $(obj)/conf 51localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
52 $(Q)mkdir -p include/generated 52 $(Q)mkdir -p include/generated
53 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config 53 $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
54 $(Q)sed -i s/=m/=y/ .tmp.config 54 $(Q)sed -i s/=m/=y/ .tmp.config
55 $(Q)if [ -f .config ]; then \ 55 $(Q)if [ -f .config ]; then \
56 cmp -s .tmp.config .config || \ 56 cmp -s .tmp.config .config || \
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;