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.tab.c_shipped | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/zconf.tab.c_shipped') diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index d777fe85627..9a06b6771ee 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -2132,9 +2132,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