Documentation of kconfig language differs from implementation regarding existence of symbols
From: Martin Walch
Date: Tue Oct 09 2012 - 20:17:14 EST
The file linux/Documentation/kbuild/kconfig-language.txt says:
> 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.
However, I can not reproduce this. The attached file contains both cases. When
running make menuconfig, setting BAR0 and BAR1 both to n, and saving the
configuration, there is neither FOO0 nor FOO1 in the resulting configuration
file.
According to the documentation, at least FOO0 should exist, even if BAR0 is
set to n. But this is not the case. AFAICS, both versions behave equivalently.
I suggest changing the documentation accordingly.
Regards
Martin Walch
--
config FOO0
tristate "FOO0"
depends on BAR0
config BAR0
tristate "BAR0"
config BAR1
tristate "BAR1"
if BAR1
config FOO1
tristate "FOO1"
endif
Attachment:
signature.asc
Description: This is a digitally signed message part.