From ebc93def5be132006c373d883c4b1b498b262a21 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 18 Apr 2011 02:07:16 +0000 Subject: [PATCH] Emit unwritten symbols in Kconfig so we don't have to do constructs like #if defined(CONFIG_FOO) && CONFIG_FOO anymore. This was partially implemented but didn't work for symbols that were unset because of a missing dependency. Patch taken from SeaBIOS. Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6511 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/kconfig/confdata.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c index 3bbad3010a..946b8a9c0b 100644 --- a/util/kconfig/confdata.c +++ b/util/kconfig/confdata.c @@ -721,8 +721,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 CONFIG_%s 0\n", + sym->name); + continue; + } switch (sym->type) { case S_BOOLEAN: case S_TRISTATE: