patch-2.2.16 linux/Documentation/kbuild/config-language.txt
Next file: linux/Documentation/kernel-docs.txt
Previous file: linux/Documentation/computone.txt
Back to the patch index
Back to the overall index
- Lines: 310
- Date:
Wed Jun 7 14:26:42 2000
- Orig file:
v2.2.15/linux/Documentation/kbuild/config-language.txt
- Orig date:
Mon Feb 1 12:03:20 1999
diff -urN v2.2.15/linux/Documentation/kbuild/config-language.txt linux/Documentation/kbuild/config-language.txt
@@ -1,5 +1,5 @@
Config Language Specification
-21 January 1999
+18 October 1999
Michael Elizabeth Chastain, <mailto:mec@shout.net>
@@ -82,7 +82,10 @@
double-quoted string. If the word is unquoted or double quoted,
then $-substition will be performed on the word.
- A /symbol/ is a single unquoted word.
+ A /symbol/ is a single unquoted word. A symbol must have a name of
+ the form CONFIG_*. scripts/mkdep.c relies on this convention in order
+ to generate dependencies on individual CONFIG_* symbols instead of
+ making one massive dependency on include/linux/autoconf.h.
A /dep/ is a dependency. Syntactically, it is a /word/. At run
time, a /dep/ must evaluate to "y", "m", "n", or "".
@@ -117,6 +120,7 @@
Dependent statements:
dep_bool /prompt/ /symbol/ /dep/ ...
+ dep_mbool /prompt/ /symbol/ /dep/ ...
dep_hex /prompt/ /symbol/ /word/ /dep/ ...
dep_int /prompt/ /symbol/ /word/ /dep/ ...
dep_string /prompt/ /symbol/ /word/ /dep/ ...
@@ -189,7 +193,7 @@
Configure: implemented
Menuconfig: implemented
-Xconfig: does not display, but writes to output files
+Xconfig: implemented
mconfig: implemented
Example:
@@ -355,8 +359,8 @@
number is a legal value.
Configure: implemented
-Menuconfig: not implemented
-Xconfig: not implemented
+Menuconfig: implemented
+Xconfig: implemented
mconfig: implemented
Example:
@@ -377,14 +381,14 @@
legal value.
Configure: implemented
-Menuconfig: not implemented
-Xconfig: not implemented
+Menuconfig: implemented
+Xconfig: implemented
mconfig: implemented
Example:
- # Not from the corpus
- define_int CONFIG_UID_TORVALDS 2026
+ # drivers/char/ftape/Config.in
+ define_int CONFIG_FT_ALPHA_CLOCK 0
@@ -394,8 +398,8 @@
are any ASCII string, except for the characters '"' and '\\'.
Configure: implemented
-Menuconfig: not implemented
-Xconfig: not implemented
+Menuconfig: implemented
+Xconfig: implemented
mconfig: implemented
Example
@@ -414,17 +418,22 @@
instead of define_bool to define tristate values. This aids in static
type checking.
-Configure: not implemented
-Menuconfig: not implemented
-Xconfig: not implemented
+Configure: implemented
+Menuconfig: implemented
+Xconfig: implemented
mconfig: implemented
Example:
- # not from the corpus
- if [ "$CONFIG_ZFTAPE" != "n" ]; then
- comment 'The compressor will be built as a module only!'
- define_tristate CONFIG_ZFT_COMPRESSOR m
+ # drivers/video/Config.in
+ if [ "$CONFIG_FB_AMIGA" = "y" ]; then
+ define_tristate CONFIG_FBCON_AFB y
+ define_tristate CONFIG_FBCON_ILBM y
+ else
+ if [ "$CONFIG_FB_AMIGA" = "m" ]; then
+ define_tristate CONFIG_FBCON_AFB m
+ define_tristate CONFIG_FBCON_ILBM m
+ fi
fi
@@ -433,22 +442,62 @@
This verb evaluates all of the dependencies in the dependency list.
Any dependency which has a value of "y" does not restrict the input
-range. Any dependency which has a value of "n", or which has some
-other value, restricts the input range to "n".
+range. Any dependency which has an empty value is ignored.
+Any dependency which has a value of "n", or which has some other value,
+(like "m") restricts the input range to "n". Quoting dependencies is not
+allowed. Using dependencies with an empty value possible is not
+recommended. See also dep_mbool below.
If the input range is restricted to the single choice "n", dep_bool
silently assigns "n" to /symbol/. If the input range has more than
one choice, dep_bool displays /prompt/ to the user, accepts a value
from the user, and assigns that value to /symbol/.
-Configure: not implemented
-Menuconfig: not implemented
-XConfig: not implemented
+Configure: implemented
+Menuconfig: implemented
+XConfig: implemented
mconfig: implemented
- # not from the corpus
- dep_bool 'RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_PCI
+Example:
+
+ # drivers/net/Config.in
+ dep_bool 'Aironet 4500/4800 PCI support 'CONFIG_AIRONET4500_PCI $CONFIG_PCI
+
+Known bugs:
+- Xconfig does not write "# foo is not set" to .config (as well as
+ "#unset foo" to autoconf.h) if command is disabled by its dependencies.
+
+
+=== dep_mbool /prompt/ /symbol/ /dep/ ...
+
+This verb evaluates all of the dependencies in the dependency list.
+Any dependency which has a value of "y" or "m" does not restrict the
+input range. Any dependency which has an empty value is ignored.
+Any dependency which has a value of "n", or which has some other value,
+restricts the input range to "n". Quoting dependencies is not allowed.
+Using dependencies with an empty value possible is not recommended.
+If the input range is restricted to the single choice "n", dep_bool
+silently assigns "n" to /symbol/. If the input range has more than
+one choice, dep_bool displays /prompt/ to the user, accepts a value
+from the user, and assigns that value to /symbol/.
+
+Notice that the only difference between dep_bool and dep_mbool
+is in the way of treating the "m" value as a dependency.
+
+Configure: implemented
+Menuconfig: implemented
+XConfig: implemented
+mconfig: not implemented
+
+Example:
+
+ # Not from the corpus
+ dep_mbool 'Packet socket: mmapped IO' CONFIG_PACKET_MMAP $CONFIG_PACKET
+
+Known bugs:
+- Xconfig does not write "# foo is not set" to .config (as well as
+ "#unset foo" to autoconf.h) if command is disabled by its dependencies.
=== dep_hex /prompt/ /symbol/ /word/ /dep/ ...
@@ -464,13 +513,15 @@
-=== dep_tristate /prompt/ /symbol /dep/ ...
+=== dep_tristate /prompt/ /symbol/ /dep/ ...
This verb evaluates all of the dependencies in the dependency list.
-Any dependency which as a value of "y" does not restrict the input range.
+Any dependency which has a value of "y" does not restrict the input range.
Any dependency which has a value of "m" restricts the input range to
-"m" or "n". Any dependency which has a value of "n", or which has some
-other value, restricts the input range to "n".
+"m" or "n". Any dependency which has an empty value is ignored.
+Any dependency which has a value of "n", or which has some other value,
+restricts the input range to "n". Quoting dependencies is not allowed.
+Using dependencies with an empty value possible is not recommended.
If the input range is restricted to the single choice "n", dep_tristate
silently assigns "n" to /symbol/. If the input range has more than
@@ -478,10 +529,18 @@
from the user, and assigns that value to /symbol/.
Configure: implemented
-Menuconfig: implemented (but silently ignores dependencies after the first)
-Xconfig: implemented (but silently ignores dependencies after the first)
+Menuconfig: implemented
+Xconfig: implemented
mconfig: implemented
+Example:
+
+ # drivers/char/Config.in
+ dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
+
+Known bugs:
+- Xconfig does not write "# foo is not set" to .config (as well as
+ "#unset foo" to autoconf.h) if command is disabled by its dependencies.
=== unset /symbol/ ...
@@ -492,9 +551,16 @@
Configure: implemented
Menuconfig: implemented
-Xconfig: not implemented
+Xconfig: implemented (with bugs)
mconfig: implemented
+Example:
+
+ # arch/mips/config.in
+ unset CONFIG_PCI
+ unset CONFIG_MIPS_JAZZ
+ unset CONFIG_VIDEO_G364
+
=== choice /prompt/ /word/ /word/
@@ -525,6 +591,14 @@
Xconfig: implemented
mconfig: implemented
+Example:
+
+ # arch/i386/config.in
+ choice ' PCI access mode' \
+ "BIOS CONFIG_PCI_GOBIOS \
+ Direct CONFIG_PCI_GODIRECT \
+ Any CONFIG_PCI_GOANY" Any
+
=== nchoice /prompt/ /symbol/ /prompt/ /symbol/ ...
@@ -555,32 +629,40 @@
/expr/ may contain the following atoms and operators. Note that, unlike
shell, you must use double quotes around every atom.
- "..." a literal
- "$..." a variable
-
- /atom/ = /atom/ true if atoms have identical value
- /atom/ != /atom/ true if atoms have different value
+ /atom/:
+ "..." a literal
+ "$..." a variable
+
+ /expr/:
+ /atom/ = /atom/ true if atoms have identical value
+ /atom/ != /atom/ true if atoms have different value
+
+ /expr/:
+ /expr/ -o /expr/ true if either expression is true
+ /expr/ -a /expr/ true if both expressions are true
+ ! /expr/ true if expression is not true
+
+Note that a naked /atom/ is not a valid /expr/. If you try to use it
+as such:
+
+ # Do not do this.
+ if [ "$CONFIG_EXPERIMENTAL" ]; then
+ bool 'Bogus experimental feature' CONFIG_BOGUS
+ fi
- /expr/ -o /expr/ true if either expression is true
- /expr/ -a /expr/ true if both expressions are true
- ! /expr/ true if expression is not true
+... then you will be surprised, because CONFIG_EXPERIMENTAL never has a
+value of the empty string! It is always "y" or "n", and both of these
+are treated as true (non-empty) by the bash-based interpreters Configure
+and Menuconfig.
Configure: implemented
Menuconfig: implemented
XConfig: implemented, with bugs
mconfig: implemented
-Xconfig has several known bugs, and probably some unknown bugs too:
-
-- In a comparison, if the left-hand atom is a variable and that variable
- is from a choice list, the right-hand atom must be "y".
-
-- In a comparison, if the right-hand atom is a variable and that variable
- is from a choice list, you lose. tkparse will throw a segmentation
- violation, silently generate bizarre TCL code, or something else.
+Xconfig has some known bugs, and probably some unknown bugs too:
-- tkparse gives the wrong precedence to -o, -a, and !. Don't use both
- -o and -a in an expression. Don't use ! at all.
+- literals with an empty "" value are not properly handled.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)