diff options
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 2e7a048e0cfc..174b230a52b0 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
@@ -205,6 +205,16 @@ static void sym_calc_visibility(struct symbol *sym) | |||
205 | } | 205 | } |
206 | if (sym_is_choice_value(sym)) | 206 | if (sym_is_choice_value(sym)) |
207 | return; | 207 | return; |
208 | /* defaulting to "yes" if no explicit "depends on" are given */ | ||
209 | tri = yes; | ||
210 | if (sym->dir_dep.expr) | ||
211 | tri = expr_calc_value(sym->dir_dep.expr); | ||
212 | if (tri == mod) | ||
213 | tri = yes; | ||
214 | if (sym->dir_dep.tri != tri) { | ||
215 | sym->dir_dep.tri = tri; | ||
216 | sym_set_changed(sym); | ||
217 | } | ||
208 | tri = no; | 218 | tri = no; |
209 | if (sym->rev_dep.expr) | 219 | if (sym->rev_dep.expr) |
210 | tri = expr_calc_value(sym->rev_dep.expr); | 220 | tri = expr_calc_value(sym->rev_dep.expr); |
@@ -321,6 +331,14 @@ void sym_calc_value(struct symbol *sym) | |||
321 | } | 331 | } |
322 | } | 332 | } |
323 | calc_newval: | 333 | calc_newval: |
334 | if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { | ||
335 | fprintf(stderr, "warning: ("); | ||
336 | expr_fprint(sym->rev_dep.expr, stderr); | ||
337 | fprintf(stderr, ") selects %s which has unmet direct dependencies (", | ||
338 | sym->name); | ||
339 | expr_fprint(sym->dir_dep.expr, stderr); | ||
340 | fprintf(stderr, ")\n"); | ||
341 | } | ||
324 | newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); | 342 | newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); |
325 | } | 343 | } |
326 | if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) | 344 | if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) |