blob: 91def0a05bb8270226743df2a1973a335e552e06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
config MODULES
bool "MODULES"
option modules
#
# Symbol visibility
#
config NO_PROMPT
bool
# Not rewritten, so MOD will have the value 'y' when running without modules
config MOD
def_tristate m
config BOOL_N
bool "bool n" if n
config BOOL_M
# Rewritten to m && MODULES
bool "bool m" if m
config BOOL_MOD
bool "bool MOD"
# Not rewritten
depends on MOD
config BOOL_Y
bool "bool y"
# Rewritten to m && MODULES
depends on y || m
config TRISTATE_N
tristate "tristate n" if n
config TRISTATE_M
# Rewritten to m && MODULES
tristate "tristate m" if m
config TRISTATE_MOD
tristate "tristate MOD"
# Not rewritten
depends on MOD
config TRISTATE_Y
bool "tristate y"
# Rewritten to m && MODULES
depends on y || m
# Symbols nested in 'if'
if n
config BOOL_IF_N
bool "bool if n"
config TRISTATE_IF_N
tristate "tristate if n"
endif
if m
config BOOL_IF_M
bool "bool if m"
config TRISTATE_IF_M
tristate "tristate if n"
endif
if y
config BOOL_IF_Y
bool "bool if y"
config TRISTATE_IF_Y
tristate "tristate if y"
endif
# Symbols nested in 'menu'
menu "menu 1"
depends on n
config BOOL_MENU_N
bool "bool menu n"
config TRISTATE_MENU_N
tristate "tristate menu n"
endmenu
menu "menu 2"
depends on m
config BOOL_MENU_M
bool "bool menu m"
config TRISTATE_MENU_M
tristate "tristate menu n"
endmenu
menu "menu 3"
depends on y
config BOOL_MENU_Y
bool "bool menu y"
config TRISTATE_MENU_Y
tristate "tristate menu y"
endmenu
# Symbols nested in choices
choice C1
tristate "choice n" if n
config BOOL_CHOICE_N
bool "bool choice n"
config TRISTATE_CHOICE_N
tristate "tristate choice n"
endchoice
choice C2
tristate "choice m" if m
config BOOL_CHOICE_M
bool "bool choice m"
config TRISTATE_CHOICE_M
tristate "tristate choice n"
endchoice
choice C3
tristate "choice y" if y
config BOOL_CHOICE_Y
bool "bool choice y"
config TRISTATE_CHOICE_Y
tristate "tristate choice y"
endchoice
#
# Choice visibility
#
choice BOOL_CHOICE_N
bool "bool choice n" if n
endchoice
choice BOOL_CHOICE_M
bool "bool choice m" if m
endchoice
choice BOOL_CHOICE_Y
bool "bool choice y" if y
endchoice
choice TRISTATE_CHOICE_N
tristate "tristate choice n" if n
endchoice
choice TRISTATE_CHOICE_M
tristate "tristate choice m" if m
endchoice
choice TRISTATE_CHOICE_Y
tristate "tristate choice y" if y
config K
tristate "K"
config L
tristate "L"
endchoice
if m
choice TRISTATE_CHOICE_IF_M_AND_Y
tristate "tristate choice if m and y" if y
config M
bool "M"
config N
bool "N"
endchoice
endif
menu "choice-containing menu"
depends on n && y
choice TRISTATE_CHOICE_MENU_N_AND_Y
tristate "tristate choice if n and y"
config O
tristate "O"
config P
tristate "P"
endchoice
endmenu
#
# Menu visibility
#
menu "menu n"
depends on n
endmenu
menu "menu m"
depends on m
endmenu
menu "menu y"
depends on y
endmenu
if n
menu "menu if n"
endmenu
endif
if m
menu "menu if m"
endmenu
endif
if y
menu "menu if y"
endmenu
endif
if m
menu "menu if m and y"
depends on y
endmenu
endif
#
# Comment visibility
#
comment "comment n"
depends on n
comment "comment m"
depends on m
comment "comment y"
depends on y
if n
comment "comment if n"
endif
if m
comment "comment if m"
endif
if y
comment "comment if y"
endif
if "y"
menu "menu with comment"
depends on m
comment "double-nested m comment"
depends on y
endmenu
endif
# Used to verify that string/int/hex symbols with m visibility accept a user
# value
if m
config STRING_m
string "string"
config INT_m
int "int"
config HEX_m
hex "hex"
endif
# Menu 'visible if' visibility
menu "n-visible menu"
visible if n
config VISIBLE_IF_N
tristate "visible if n"
endmenu
menu "m-visible menu"
visible if m
config VISIBLE_IF_M
tristate "visible if m"
endmenu
menu "y-visible menu"
visible if y
config VISIBLE_IF_Y
tristate "visible if m"
endmenu
menu "m-visible menu 2"
visible if y || n
visible if m && y
visible if y
if y
config VISIBLE_IF_M_2
tristate "visible if m 2"
endif
endmenu
|