build: ensure that reordering of KCONFIG lines are handled properly and that the...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 22 Jul 2012 21:00:07 +0000 (21:00 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 22 Jul 2012 21:00:07 +0000 (21:00 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32788 3c298f89-4303-0410-b956-a3cf2f4a3e73

scripts/kconfig.pl
scripts/metadata.pl

index 8113273..b91cdf3 100755 (executable)
@@ -73,7 +73,10 @@ sub config_add($$$) {
                my %cfg = %$_;
                
                foreach my $config (keys %cfg) {
-                       next if $mod_plus and $config{$config} and $config{$config} eq "y";
+                       if ($mod_plus and $config{$config}) {
+                               next if $config{$config} eq "y";
+                               next if $cfg{$config} eq '#undef';
+                       }
                        $config{$config} = $cfg{$config};
                }
        }
index d250a71..bd6dbc5 100755 (executable)
@@ -115,6 +115,7 @@ sub gen_kconfig_overrides() {
                                        $val = $2;
                                }
                                if ($config{"CONFIG_PACKAGE_$package"} and ($config ne 'n')) {
+                                       next if $kconfig{$config} eq 'y';
                                        $kconfig{$config} = $val;
                                } elsif (!$override) {
                                        $kconfig{$config} or $kconfig{$config} = 'n';