diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2011-07-20 08:40:09 +0400 |
---|---|---|
committer | Arnaud Lacombe <lacombar@gmail.com> | 2011-08-08 09:44:26 +0400 |
commit | 22d550ae83603aa8d64d72dd1e2309cd7a96ac89 (patch) | |
tree | 57952838dbc83d322a03bef2421596366991d8cd /scripts/kconfig | |
parent | f597a718296eef9622ebc1d13f4f8324fa169cef (diff) | |
download | linux-22d550ae83603aa8d64d72dd1e2309cd7a96ac89.tar.xz |
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')
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 14 |
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 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config $(Q)if [ -f .config ]; then \ cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ @@ -50,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf localyesconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config $(Q)sed -i s/=m/=y/ .tmp.config $(Q)if [ -f .config ]; then \ 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 @@ # make oldconfig # use strict; +use Getopt::Long; my $config = ".config"; @@ -112,6 +113,13 @@ sub find_config { find_config; +# Parse options +my $localmodconfig = 0; +my $localyesconfig = 0; + +GetOptions("localmodconfig" => \$localmodconfig, + "localyesconfig" => \$localyesconfig); + # Get the build source and top level Kconfig file (passed in) my $ksource = $ARGV[0]; my $kconfig = $ARGV[1]; @@ -425,7 +433,11 @@ while(<CIN>) { if (/^(CONFIG.*)=(m|y)/) { if (defined($configs{$1})) { - $setconfigs{$1} = $2; + if ($localyesconfig) { + $setconfigs{$1} = 'y'; + } else { + $setconfigs{$1} = $2; + } } elsif ($2 eq "m") { print "# $1 is not set\n"; next; |