From 5447d34b080a1e3e312b05a91e87eff4710a1152 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 6 May 2007 09:20:10 +0200 Subject: kconfig: error out if recursive dependencies are found Sample: config FOO bool "This is foo" depends on BAR config BAR bool "This is bar" depends on FOO This will result in following error message: error: found recursive dependency: FOO -> BAR -> FOO And will then exit with exit code equal 1 so make will stop. Inspired by patch from: Adrian Bunk Signed-off-by: Sam Ravnborg Cc: Adrian Bunk Cc: Roman Zippel --- scripts/kconfig/zconf.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/zconf.y') diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 04a5864c03b..92eb02bdf9c 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -501,9 +501,11 @@ void conf_parse(const char *name) } menu_finalize(&rootmenu); for_all_symbols(i, sym) { - sym_check_deps(sym); + if (sym_check_deps(sym)) + zconfnerrs++; } - + if (zconfnerrs) + exit(1); sym_set_change_count(1); } -- cgit v1.2.3