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

Showing the changes to scripts (2 of 2 files). Show all

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
35 35
36localmodconfig: $(obj)/streamline_config.pl $(obj)/conf36localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
37 $(Q)mkdir -p include/generated37 $(Q)mkdir -p include/generated
38 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config38 $(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 · 8 unmodified lines
50 50
51localyesconfig: $(obj)/streamline_config.pl $(obj)/conf51localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
52 $(Q)mkdir -p include/generated52 $(Q)mkdir -p include/generated
53 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config53 $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
54 $(Q)sed -i s/=m/=y/ .tmp.config54 $(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 || \
scripts/kconfig/streamline_config.pl+13−1
@@ -43,6 +43,7 @@ · 42 unmodified lines
43# make oldconfig43# 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 { · 63 unmodified lines
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>) { · 307 unmodified lines
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;