]> err.no Git - linux-2.6/commitdiff
kconfig: allow overriding symbols
authorJan Engelhardt <jengelh@computergmbh.de>
Thu, 3 Jan 2008 22:33:44 +0000 (23:33 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 28 Jan 2008 22:14:37 +0000 (23:14 +0100)
Allow config variables in .config to override earlier ones in the same
file. In other words,

# CONFIG_SECURITY is not defined
CONFIG_SECURITY=y

will activate it. This makes it a bit easier to do

cat original-config myconfig myconfig2 ... >.config;
and run *config as expected.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
scripts/kconfig/confdata.c

index e0f402f3b75d94d765875a6299f1f154e23a1c32..2eccefb03a93b9d1c4abb911a11841d8d96ba556 100644 (file)
@@ -232,8 +232,7 @@ load:
                                        sym->type = S_BOOLEAN;
                        }
                        if (sym->flags & def_flags) {
-                               conf_warning("trying to reassign symbol %s", sym->name);
-                               break;
+                               conf_warning("override: reassigning to symbol %s", sym->name);
                        }
                        switch (sym->type) {
                        case S_BOOLEAN:
@@ -272,8 +271,7 @@ load:
                                        sym->type = S_OTHER;
                        }
                        if (sym->flags & def_flags) {
-                               conf_warning("trying to reassign symbol %s", sym->name);
-                               break;
+                               conf_warning("override: reassigning to symbol %s", sym->name);
                        }
                        if (conf_set_sym_val(sym, def, def_flags, p))
                                continue;
@@ -297,11 +295,9 @@ load:
                                }
                                break;
                        case yes:
-                               if (cs->def[def].tri != no) {
-                                       conf_warning("%s creates inconsistent choice state", sym->name);
-                                       cs->flags &= ~def_flags;
-                               } else
-                                       cs->def[def].val = sym;
+                               if (cs->def[def].tri != no)
+                                       conf_warning("override: %s changes choice state", sym->name);
+                               cs->def[def].val = sym;
                                break;
                        }
                        cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);