aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-08-23 22:13:19 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-08-23 22:13:19 -0400
commit37a91e9c10648208de002c75df304e23ca89e256 (patch)
treee2511984ee2e00a8fd513c0cdbd69a2b8e3fab92 /scripts
parent8cd497a117e918617990cccb9477c73ec5d60f53 (diff)
downloadkutter-37a91e9c10648208de002c75df304e23ca89e256.tar.gz
kutter-37a91e9c10648208de002c75df304e23ca89e256.tar.xz
kutter-37a91e9c10648208de002c75df304e23ca89e256.zip
build: Update kconfig to always emit symbols - even when false.
Always emit CONFIG_X definitions in autoconf.h - set them to 0 when they are disabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f88d90f2..08e75599 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -543,6 +543,8 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
switch (*value) {
case 'n':
+ fprintf(fp, "#define %s%s%s 0\n",
+ CONFIG_, sym->name, suffix);
break;
case 'm':
suffix = "_MODULE";
@@ -558,6 +560,8 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X'))
prefix = "0x";
+ if (!value[0])
+ prefix = "0";
fprintf(fp, "#define %s%s %s%s\n",
CONFIG_, sym->name, prefix, value);
break;
@@ -983,8 +987,12 @@ 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)) {
+ conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
continue;
+ }
/* write symbol to auto.conf, tristate and header files */
conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);