build: ensure that reordering of KCONFIG lines are handled properly and that the...
authorFelix Fietkau <nbd@openwrt.org>
Sun, 22 Jul 2012 21:00:07 +0000 (21:00 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 22 Jul 2012 21:00:07 +0000 (21:00 +0000)
SVN-Revision: 32788

scripts/kconfig.pl
scripts/metadata.pl

index 811327353867f8303f4c226f5c84b3f4c5bb47ec..b91cdf397aa828f28e6533b82fc5a54b0144ef4a 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 d250a719788d95b5f0584fcdeb6875439296e886..bd6dbc54ac02b9ba1fb379c51deae64418228346 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';