History

kconfig/streamline_config.pl: use options to determine operating mode

The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior.

Arnaud Lacombe committed 15 years ago

Commit 22d550a1 parent f597a712 files · +15 −3Browse files

Unified · Split

2 files
  1. scripts/kconfig/Makefile +2 −2
  2. scripts/kconfig/streamline_config.pl +13 −1
scripts/kconfig/Makefile+2−2
@@ -35,7 +35,7 @@ silentoldconfig: $(obj)/conf · 34 unmodified lines
3535
3636 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
3737 $(Q)mkdir -p include/generated
38− $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
38+ $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
3939 $(Q)if [ -f .config ]; then \
4040 cmp -s .tmp.config .config || \
4141 (mv -f .config .config.old.1; \
@@ -50,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf · 8 unmodified lines
5050
5151 localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
5252 $(Q)mkdir -p include/generated
53− $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
53+ $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
5454 $(Q)sed -i s/=m/=y/ .tmp.config
5555 $(Q)if [ -f .config ]; then \
5656 cmp -s .tmp.config .config || \
scripts/kconfig/streamline_config.pl+13−1
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343 # make oldconfig
4444 #
4545 use strict;
46+use Getopt::Long;
4647
4748 my $config = ".config";
4849
@@ -112,6 +113,13 @@ sub find_config { · 63 unmodified lines
112113
113114 find_config;
114115
116+# Parse options
117+my $localmodconfig = 0;
118+my $localyesconfig = 0;
119+
120+GetOptions("localmodconfig" => \$localmodconfig,
121+ "localyesconfig" => \$localyesconfig);
122+
115123 # Get the build source and top level Kconfig file (passed in)
116124 my $ksource = $ARGV[0];
117125 my $kconfig = $ARGV[1];
@@ -425,7 +433,11 @@ while(<CIN>) { · 307 unmodified lines
425433
426434 if (/^(CONFIG.*)=(m|y)/) {
427435 if (defined($configs{$1})) {
428− $setconfigs{$1} = $2;
436+ if ($localyesconfig) {
437+ $setconfigs{$1} = 'y';
438+ } else {
439+ $setconfigs{$1} = $2;
440+ }
429441 } elsif ($2 eq "m") {
430442 print "# $1 is not set\n";
431443 next;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t