kconfig-language: add to hints
authorRandy Dunlap <randy.dunlap@oracle.com>
Thu, 28 Apr 2011 17:58:52 +0000 (10:58 -0700)
committerMichal Marek <mmarek@suse.cz>
Mon, 2 May 2011 15:39:24 +0000 (17:39 +0200)
Explain a little about kconfig symbol dependencies and symbol
existence given optional kconfig language scenarios.
Yes, I was bitten by this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Documentation/kbuild/kconfig-language.txt

index 48a3981..44e2649 100644 (file)
@@ -389,3 +389,25 @@ config FOO
 
 limits FOO to module (=m) or disabled (=n).
 
+Kconfig symbol existence
+~~~~~~~~~~~~~~~~~~~~~~~~
+The following two methods produce the same kconfig symbol dependencies
+but differ greatly in kconfig symbol existence (production) in the
+generated config file.
+
+case 1:
+
+config FOO
+       tristate "about foo"
+       depends on BAR
+
+vs. case 2:
+
+if BAR
+config FOO
+       tristate "about foo"
+endif
+
+In case 1, the symbol FOO will always exist in the config file (given
+no other dependencies).  In case 2, the symbol FOO will only exist in
+the config file if BAR is enabled.