~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to Documentation/kbuild/kconfig-language.txt

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        That will limit the usefulness but on the other hand avoid
114
114
        the illegal configurations all over.
115
115
 
 
116
- limiting menu display: "visible if" <expr>
 
117
  This attribute is only applicable to menu blocks, if the condition is
 
118
  false, the menu block is not displayed to the user (the symbols
 
119
  contained there can still be selected by other symbols, though). It is
 
120
  similar to a conditional "prompt" attribude for individual menu
 
121
  entries. Default value of "visible" is true.
 
122
 
116
123
- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
117
124
  This allows to limit the range of possible input values for int
118
125
  and hex symbols. The user can only input a value which is larger than
303
310
        "endmenu"
304
311
 
305
312
This defines a menu block, see "Menu structure" above for more
306
 
information. The only possible options are dependencies.
 
313
information. The only possible options are dependencies and "visible"
 
314
attributes.
307
315
 
308
316
if:
309
317
 
381
389
 
382
390
limits FOO to module (=m) or disabled (=n).
383
391
 
 
392
Kconfig symbol existence
 
393
~~~~~~~~~~~~~~~~~~~~~~~~
 
394
The following two methods produce the same kconfig symbol dependencies
 
395
but differ greatly in kconfig symbol existence (production) in the
 
396
generated config file.
 
397
 
 
398
case 1:
 
399
 
 
400
config FOO
 
401
        tristate "about foo"
 
402
        depends on BAR
 
403
 
 
404
vs. case 2:
 
405
 
 
406
if BAR
 
407
config FOO
 
408
        tristate "about foo"
 
409
endif
 
410
 
 
411
In case 1, the symbol FOO will always exist in the config file (given
 
412
no other dependencies).  In case 2, the symbol FOO will only exist in
 
413
the config file if BAR is enabled.