summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfiglib.py3
-rw-r--r--tests/Kstr14
-rw-r--r--testsuite.py8
3 files changed, 25 insertions, 0 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index eaa9af8..a05a079 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -4035,6 +4035,9 @@ def _sym_choice_str(sc):
imply_string += " if " + expr_str(cond)
indent_add(imply_string)
+ if node.dep is not sc.kconfig.y:
+ indent_add("depends on " + expr_str(node.dep))
+
if node.help is not None:
indent_add("help")
for line in node.help.splitlines():
diff --git a/tests/Kstr b/tests/Kstr
index d792f08..0948b11 100644
--- a/tests/Kstr
+++ b/tests/Kstr
@@ -33,10 +33,24 @@ menuconfig ADVANCED
prompt "prompt 3"
depends on DEP2
+if DEP3
+
+menu "foo"
+ depends on DEP4
+
config ADVANCED
help
second help text
+endmenu
+
+endif
+
+config ONLY_DIRECT_DEPS
+ int
+ depends on DEP1
+ depends on DEP2
+
config STRING
string
default "foo"
diff --git a/testsuite.py b/testsuite.py
index ad32070..fba897a 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -524,12 +524,20 @@ config ADVANCED
menuconfig ADVANCED
prompt "prompt 3" if DEP2
+ depends on DEP2
config ADVANCED
+ depends on DEP4 && DEP3
help
second help text
""")
+ verify_str(c.syms["ONLY_DIRECT_DEPS"], """
+config ONLY_DIRECT_DEPS
+ int
+ depends on DEP1 && DEP2
+""")
+
verify_str(c.syms["STRING"], """
config STRING
string