kbuild: Warn on selecting symbols with unmet direct dependencies

The "select" statement in Kconfig files allows the enabling of options
even if they have unmet direct dependencies (i.e. "depends on" expands
to "no"). Currently, the "depends on" clauses are used in calculating
the visibility but they do not affect the reverse dependencies in any
way.

The patch introduces additional tracking of the "depends on" statements
and prints a warning on selecting an option if its direct dependencies
are not met.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Catalin Marinas 2010-06-08 17:25:57 +01:00 committed by Michal Marek
parent 60c8eca69f
commit 246cf9c26b
3 changed files with 25 additions and 0 deletions

View file

@ -83,6 +83,7 @@ struct symbol {
tristate visible;
int flags;
struct property *prop;
struct expr_value dir_dep;
struct expr_value rev_dep;
};
@ -163,6 +164,7 @@ struct menu {
struct symbol *sym;
struct property *prompt;
struct expr *dep;
struct expr *dir_dep;
unsigned int flags;
char *help;
struct file *file;