Re: Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-11 Thread Yann E. MORIN
Michal, Martin, All,

On Thursday 11 October 2012 22:27:36 Michal Marek wrote:
> Dne 10.10.2012 02:17, Martin Walch napsal(a):
> > 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.
> 
> Indeed, that paragraph seems wrong. I think we should revert commit
> 64b81ed. Randy, Arnaud?

I just tested with Martin's example, and:
  - indeed, both symbols appear as "is not set",
  - that paragraph was already wrong for Kconfig at #64b81ed.

Before we trim that paragraph away, what's the purpose of the expected
difference in behavior for the two constructs?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-11 Thread Michal Marek
Dne 10.10.2012 02:17, Martin Walch napsal(a):
> 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.

Indeed, that paragraph seems wrong. I think we should revert commit
64b81ed. Randy, Arnaud?

Thanks,
Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-11 Thread Michal Marek
Dne 10.10.2012 02:17, Martin Walch napsal(a):
 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.

Indeed, that paragraph seems wrong. I think we should revert commit
64b81ed. Randy, Arnaud?

Thanks,
Michal

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-11 Thread Yann E. MORIN
Michal, Martin, All,

On Thursday 11 October 2012 22:27:36 Michal Marek wrote:
 Dne 10.10.2012 02:17, Martin Walch napsal(a):
  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.
 
 Indeed, that paragraph seems wrong. I think we should revert commit
 64b81ed. Randy, Arnaud?

I just tested with Martin's example, and:
  - indeed, both symbols appear as is not set,
  - that paragraph was already wrong for Kconfig at #64b81ed.

Before we trim that paragraph away, what's the purpose of the expected
difference in behavior for the two constructs?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-09 Thread Martin Walch
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


signature.asc
Description: This is a digitally signed message part.


Documentation of kconfig language differs from implementation regarding existence of symbols

2012-10-09 Thread Martin Walch
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


signature.asc
Description: This is a digitally signed message part.