Skip to contentSkip to conversation

kconfig-language: improve menuconfig usage description

PATCH Applied Eugeniu Rosca 2 participants 3 messages Aug 2, 2016 – Aug 19, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig-language: improve menuconfig usage description

Improper menuconfig usage leads to empty menu entries. zconfdump() is able to reveal some real-life examples:
- menuconfig VFIO_NOIOMMU
- menuconfig RESET_CONTROLLER
- menuconfig SND_ARM

To avoid future occurrences of those, improve the menuconfig syntax description.

---
 Documentation/kbuild/kconfig-language.txt | 39 ++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)
Documentation/kbuild/kconfig-language.txt +38 -1
index db10185..069fcb3 100644
@@ -274,7 +274,44 @@ menuconfig:
 
 This is similar to the simple config entry above, but it also gives a
 hint to front ends, that all suboptions should be displayed as a
-separate list of options.
+separate list of options. To make sure all the suboptions will really
+show up under the menuconfig entry and not outside of it, every item
+from the <config options> list must depend on the menuconfig symbol.
+In practice, this is achieved by using one of the next two constructs:
+
+(1):
+menuconfig M
+if M
+    config C1
+    config C2
+endif
+
+(2):
+menuconfig M
+config C1
+    depends on M
+config C2
+    depends on M
+
+In the following examples (3) and (4), C1 and C2 still have the M
+dependency, but will not appear under menuconfig M anymore, because
+of C0, which doesn't depend on M:
+
+(3):
+menuconfig M
+    config C0
+if M
+    config C1
+    config C2
+endif
+
+(4):
+menuconfig M
+config C0
+config C1
+    depends on M
+config C2
+    depends on M
 
 choices:
 
Signature · 1 line
2.9.2
maintainer Applied
#1 lore raw
Quoted 8 lines · On Wed, 3 Aug 2016 00:40:34 +0200 Eugeniu Rosca <[email protected]> wrote:

Improper menuconfig usage leads to empty menu entries. zconfdump() is able to reveal some real-life examples:
- menuconfig VFIO_NOIOMMU
- menuconfig RESET_CONTROLLER
- menuconfig SND_ARM

To avoid future occurrences of those, improve the menuconfig syntax description.

I've applied this to the docs tree, thanks.

Hopefully you sent patches to fix up the broken menus? :)

jon