initial revision
[ucgine.git] / tools / cfzy / cfzy-test / test-configs / conftree.cfzy
1 #
2 # comments are prefixed by #
3 #
4
5 # a menu node is a node that has no value but contains several
6 # other nodes
7 menu MENU1
8         prompt "Menu 1"
9         # comments can also be added inside a node
10
11 # a config node is the most basic node, storing a boolean value
12 config MENU1_CONFIG1
13         prompt "A config example"
14         default y
15
16 # a comment node is a node that has no value but it will display
17 # a prompt in the GUI
18 comment "Hello"
19
20 # a node can have several default values: each expression is evaluated
21 # in the same order until one matches. If no expression matches, the
22 # default value of the node is used
23 config MENU1_CONFIG2
24         prompt "Another config example"
25         default y if !MENU1_CONFIG1
26         default n
27
28 # environment variables can be used anywhere in a conftree file: they
29 # are evaluated and replaced by their value before parsing the file.
30 config MENU1_CONFIG3
31         prompt "A config example"
32         ---help---
33         The content of the PATH variable is $(PATH)
34
35 # a choice node cntains several choiceconfig nodes that are exclusive
36 # each other
37 choice MENU1_CHOICE
38         prompt "This is menu 1 choice 1"
39         default MENU1_CHOICE2 if MENU1_CONFIG1
40         default MENU1_CHOICE3
41         ---help---
42         help of menu1_choice: this is a choice between
43         several values.
44
45 choiceconfig MENU1_CHOICE1
46         prompt "choice 1"
47
48 choiceconfig MENU1_CHOICE2
49         prompt "choice 2"
50
51 choiceconfig MENU1_CHOICE3
52         prompt "choice 3"
53
54 endchoice # this closes the "choice" node
55
56 # an intconfig node stores an integer value
57 intconfig INT_EXAMPLE
58         prompt "integer example"
59         default 12000000
60         ---help---
61         This is the help of the integer node
62
63 # a strconfig stores a string
64 strconfig STR_EXAMPLE
65         prompt "A strconfig example"
66         default "my default value"
67
68 endmenu
69
70 # A menuconfig node is a menu node that can be enabled or disabled.
71 # The children nodes are available only if the node is enabled.
72 menuconfig MENUCONFIG1
73         prompt "My menuconfig node"
74         # If a line is too long, it can be splitted with a backslash
75         default y if !MENU1_CONFIG1 && \
76                 MENU1_CHOICE1
77         ---help---
78         Help for the menuconfig node
79
80 # the "requires" attribute sets a list of expressions that must be
81 # evaluated to True to enable the node.
82 config MENUCONFIG1_CONFIG1
83         prompt "again, a config"
84         requires MENU1_CONFIG1
85         requires !MENU1_CHOICE3
86
87 if MENU1_CHOICE1 || MENU1_CHOICE2
88
89 config MENUCONFIG1_CONFIG2
90         prompt "still another config"
91
92 # source another sub conftree file: the path can be relative to this file
93 # or absolute. The "./" is not mandatory here.
94 source "./subconftree.cfzy"
95
96 endif
97
98 endmenuconfig