struct cnfexpr *cnf_copy(struct cnfexpr *el);
void free_cnf(struct cnfexpr *e);
-struct cnfexpr *kconfig_cnfexpr(struct symlist *sl, bool nt,
+struct cnfexpr *kconfig_cnfexpr(struct symlist *sl, bool nt, bool def,
struct symbol *sym, struct expr *expr) {
struct stck {
struct expr *expr;
free(stack);
struct symlist_el *se = symlist_find(sl, sym->name);
- if (se->prompt || nt == true)
+ if (se->prompt || (nt == true && def == true))
rtrn = cnf_or(cnf_sym(sl, !nt, sym), rtrn);
else {
struct cnfexpr *w12 = cnf_not(cnf_copy(rtrn));
unsigned size;
};
-struct cnfexpr *kconfig_cnfexpr(struct symlist *sl, bool nt,
+struct cnfexpr *kconfig_cnfexpr(struct symlist *sl, bool nt, bool def,
struct symbol *sym, struct expr *expr);
void cnf_printf(struct cnfexpr *);
gsymlist->array[gsymlist->pos - 1].prompt = true;
break;
}
+ for_all_defaults(sym, prop) {
+ gsymlist->array[gsymlist->pos - 1].def = true;
+ break;
+ }
}
}
if (verbose_level > 3)
printf_original(gsymlist, sym->dir_dep.expr);
el->be =
- kconfig_cnfexpr(gsymlist, false, sym,
+ kconfig_cnfexpr(gsymlist, false, el->def, sym,
sym->dir_dep.expr);
Iprintf("Direct:\n");
if (verbose_level > 2)
if (verbose_level > 3)
printf_original(gsymlist, sym->rev_dep.expr);
el->re_be =
- kconfig_cnfexpr(gsymlist, true, sym,
+ kconfig_cnfexpr(gsymlist, true, el->def, sym,
sym->rev_dep.expr);
Iprintf("Revers:\n");
if (verbose_level > 2)
sl->array[sl->pos].name = name;
sl->array[sl->pos].be = NULL;
sl->array[sl->pos].prompt = false;
+ sl->array[sl->pos].def = true;
sl->pos++;
}
struct symlist_el {
unsigned int id;
char *name;
- bool prompt;
+ bool prompt, def;
struct cnfexpr *be;
struct cnfexpr *re_be; // forward dependency
};