diff options
author | Eugeniu Rosca <roscaeugeniu@gmail.com> | 2016-08-03 00:40:34 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-08-18 15:23:31 -0600 |
commit | cfd7c612baa61af61b2c57b7b8321adf2d1b5d90 (patch) | |
tree | 8bef0d6797a341c5c40a3bf7875072076feea0d4 /Documentation/kbuild/kconfig-language.txt | |
parent | 22c6bbe41ecf7606c3effc92b54d5e939e806866 (diff) | |
download | linux-stable-cfd7c612baa61af61b2c57b7b8321adf2d1b5d90.tar.gz linux-stable-cfd7c612baa61af61b2c57b7b8321adf2d1b5d90.tar.bz2 linux-stable-cfd7c612baa61af61b2c57b7b8321adf2d1b5d90.zip |
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.
Signed-off-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/kbuild/kconfig-language.txt')
-rw-r--r-- | Documentation/kbuild/kconfig-language.txt | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index db101857b2c9..069fcb3eef6e 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -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: |