The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior.
Showing the changes to scripts (2 of 2 files). Show all
Unified · Split
| @@ -35,7 +35,7 @@ silentoldconfig: $(obj)/conf · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | localmodconfig: $(obj)/streamline_config.pl $(obj)/conf |
| 37 | 37 | $(Q)mkdir -p include/generated |
| 38 | − $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config | |
| 38 | + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config | |
| 39 | 39 | $(Q)if [ -f .config ]; then \ |
| 40 | 40 | cmp -s .tmp.config .config || \ |
| 41 | 41 | (mv -f .config .config.old.1; \ |
| @@ -50,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf · 8 unmodified lines | ||
| 50 | 50 | |
| 51 | 51 | localyesconfig: $(obj)/streamline_config.pl $(obj)/conf |
| 52 | 52 | $(Q)mkdir -p include/generated |
| 53 | − $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config | |
| 53 | + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config | |
| 54 | 54 | $(Q)sed -i s/=m/=y/ .tmp.config |
| 55 | 55 | $(Q)if [ -f .config ]; then \ |
| 56 | 56 | cmp -s .tmp.config .config || \ |
| @@ -43,6 +43,7 @@ · 42 unmodified lines | ||
| 43 | 43 | # make oldconfig |
| 44 | 44 | # |
| 45 | 45 | use strict; |
| 46 | +use Getopt::Long; | |
| 46 | 47 | |
| 47 | 48 | my $config = ".config"; |
| 48 | 49 | |
| @@ -112,6 +113,13 @@ sub find_config { · 63 unmodified lines | ||
| 112 | 113 | |
| 113 | 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 | 123 | # Get the build source and top level Kconfig file (passed in) |
| 116 | 124 | my $ksource = $ARGV[0]; |
| 117 | 125 | my $kconfig = $ARGV[1]; |
| @@ -425,7 +433,11 @@ while(<CIN>) { · 307 unmodified lines | ||
| 425 | 433 | |
| 426 | 434 | if (/^(CONFIG.*)=(m|y)/) { |
| 427 | 435 | if (defined($configs{$1})) { |
| 428 | − $setconfigs{$1} = $2; | |
| 436 | + if ($localyesconfig) { | |
| 437 | + $setconfigs{$1} = 'y'; | |
| 438 | + } else { | |
| 439 | + $setconfigs{$1} = $2; | |
| 440 | + } | |
| 429 | 441 | } elsif ($2 eq "m") { |
| 430 | 442 | print "# $1 is not set\n"; |
| 431 | 443 | next; |