diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-01-26 20:09:39 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-01-29 09:44:24 -0500 |
commit | b623e7c56883d69049d3060d148c5b0c9d71fafc (patch) | |
tree | 1c3d36de744ffc713edde9d487c07156d931540e | |
parent | 0da7bfdf21b2bbbfd74178f2943cd4efc9f995c5 (diff) |
Change kconfig to emit disabled symbols in autoconf.h.
Always emit CONFIG_X definitions in autoconf.h - set them to 0 when
they are disabled.
-rw-r--r-- | tools/kconfig/confdata.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/kconfig/confdata.c b/tools/kconfig/confdata.c index 61c35bf..f110bf5 100644 --- a/tools/kconfig/confdata.c +++ b/tools/kconfig/confdata.c @@ -830,8 +830,15 @@ int conf_write_autoconf(void) for_all_symbols(i, sym) { sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE) || !sym->name) + if (!sym->name) continue; + if (!(sym->flags & SYMBOL_WRITE)) { + if (sym->type == S_BOOLEAN || sym->type == S_HEX + || sym->type == S_INT) + fprintf(out_h, "#define %s%s 0\n", + CONFIG_, sym->name); + continue; + } /* write symbol to config file */ conf_write_symbol(sym, out, false); @@ -842,6 +849,8 @@ int conf_write_autoconf(void) case S_TRISTATE: switch (sym_get_tristate_value(sym)) { case no: + fprintf(out_h, "#define %s%s 0\n", + CONFIG_, sym->name); break; case mod: fprintf(tristate, "%s%s=M\n", |