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 <bunk@stusta.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index d777fe8..9a06b67 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -2132,9 +2132,11 @@
 	}
 	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);
 }