Debian Codegraph @

autotests/html/Kconfig.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <title>Kconfig</title>
5 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (Kconfig) - Theme (Breeze Light)"/>
6 </head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
7 <span style="color:#0057ae;">This</span> <span style="color:#bf0303;text-decoration:underline;">is wrong but should not crash ] ) } !</span>
8
9 <span style="color:#898887;"># comment</span>
10
11 <span style="font-weight:bold;">config</span> BR2_PACKAGE_GAMMARAY
12 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;gammaray&quot;</span>
13 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> BR2_PACKAGE_QT5
14 <span style="color:#006e28;">help</span>
15 <span style="color:#e31616;"> GammaRay Qt introspection probe.</span>
16 <span style="color:#e31616;"> second line of help, with correct indentation</span>
17
18 <span style="color:#e31616;"> GammaRay Qt introspection probe.</span>
19 <span style="color:#e31616;"> second line of help, with correct indentation</span>
20 <span style="color:#e31616;"> </span><span style="color:#bf0303;text-decoration:underline;">third line underindented and thus wrong</span>
21 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">'true'</span>
22 <span style="font-weight:bold;">config</span> W1_MASTER_GPIO_CUSTOM
23 <span style="color:#0057ae;">tristate</span> <span style="color:#bf0303;">&quot;Custom GPIO-based W1 driver&quot;</span>
24 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> GENERIC_GPIO
25 <span style="color:#006e28;">select</span> W1_GPIOconfig <span style="color:#bf0303;text-decoration:underline;">AG71XX</span>
26 <span style="color:#0057ae;">tristate</span> <span style="color:#bf0303;">&quot;Atheros AR7XXX/AR9XXX built-in ethernet mac support&quot;</span>
27 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> ATH79
28 <span style="color:#006e28;">imply</span> HAS_TXX9_SERIAL
29 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> LD_VERSION <span style="color:#ca60ca;">&gt;=</span> 225000000 <span style="color:#ca60ca;">||</span> LD_IS_LLD
30 <span style="color:#006e28;">select</span> PHYLIB
31 <span style="color:#006e28;text-decoration:line-through;">---help---</span>
32 <span style="color:#e31616;"> If you wish to compile a kernel for AR7XXX/91XXX and enable</span>
33 <span style="color:#e31616;"> ethernet support, then you should always answer Y to this.</span>
34
35 <span style="font-weight:bold;">comment</span> <span style="color:#bf0303;">&quot;module support disabled&quot;</span>
36 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> <span style="color:#ca60ca;">!</span>MODULES
37
38 <span style="font-weight:bold;">menu</span> <span style="text-decoration:line-through;">myMenu</span>
39 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> NET
40 <span style="font-weight:bold;">config</span> NETDEVICES
41 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Atheros AR71xx built-in ethernet driver debugging&quot;</span>
42 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> ds
43 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">n</span>
44 <span style="color:#006e28;">help</span>
45 <span style="color:#e31616;"> Atheros AR71xx built-in ethernet driver debugging messages.</span>
46 <span style="font-weight:bold;">endmenu</span>
47 <span style="font-weight:bold;">if</span> TARGET_OX820
48
49 <span style="font-weight:bold;">config</span> SYS_CPU
50 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">&quot;arm1136&quot;</span>
51
52 <span style="font-weight:bold;">endif</span>
53
54 <span style="font-weight:bold;">if</span> AG71XX
55 <span style="font-weight:bold;">config</span> AG71XX_DEBUG
56 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Atheros AR71xx built-in ethernet driver debugging&quot;</span>
57 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">n</span>
58 <span style="color:#006e28;">help</span>
59 <span style="color:#e31616;"> Atheros AR71xx built-in ethernet driver debugging messages.</span>
60 <span style="font-weight:bold;">endif</span>
61
62 <span style="color:#898887;"># comment</span>
63
64 <span style="font-weight:bold;">menu</span> <span style="color:#bf0303;">&quot;System setup&quot;</span>
65
66 <span style="font-weight:bold;">choice</span>
67 <span style="color:#006e28;">prompt</span> <span style="color:#bf0303;">&quot;Alpha system type&quot;</span>
68 <span style="color:#006e28;">default</span> ALPHA_GENERIC
69 <span style="color:#bf0303;background-color:#f7e6e6;font-weight:bold;text-decoration:line-through;">string</span> <span style="color:#bf0303;">&quot;bad&quot;</span>
70 <span style="color:#006e28;text-decoration:line-through;">---help---</span>
71 <span style="color:#e31616;"> This is the system type of your hardware.</span>
72
73 <span style="color:#e31616;"> </span><span style="font-weight:bold;">config</span> HZ_32
74 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;32 Hz&quot;</span>
75 <span style="font-weight:bold;">config</span> HZ_64
76 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;64 Hz&quot;</span>
77
78 <span style="font-weight:bold;">config</span> ALPHA_GENERIC
79 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Generic&quot;</span>
80 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> TTY
81 <span style="color:#006e28;">select</span> HAVE_EISA
82 <span style="color:#006e28;">select</span> GENERIC_BUG_RELATIVE_POINTERS <span style="font-weight:bold;">if</span> X86_64
83 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;64-bit kernel&quot;</span> <span style="font-weight:bold;">if</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">SUBARCH</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;">&quot;</span> <span style="color:#ca60ca;">=</span> <span style="color:#bf0303;">&quot;x86&quot;</span>
84 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Support the legacy </span><span style="color:#3daee9;">\&quot;</span><span style="color:#bf0303;">mmu-masters</span><span style="color:#3daee9;">\&quot;</span><span style="color:#bf0303;"> devicetree bindings&quot;</span>
85 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> ARM_SMMU<span style="color:#ca60ca;">=</span><span style="color:#aa5500;">y</span> <span style="color:#ca60ca;">&amp;&amp;</span> OF
86 <span style="color:#006e28;">help</span>
87 <span style="color:#e31616;"> A generic kernel will run on all supported Alpha hardware.</span>
88
89 <span style="font-weight:bold;">endchoice</span>
90
91 <span style="font-weight:bold;">config</span> VGA_HOSE
92 <span style="color:#0057ae;">bool</span>
93 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> <span style="color:#aa5500;">y</span>
94 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> VGA_CONSOLE <span style="color:#ca60ca;">&amp;&amp;</span> <span style="color:#ca60ca;">(</span>ALPHA_GENERIC <span style="color:#ca60ca;">||</span> ALPHA_TITAN <span style="color:#ca60ca;">||</span> ALPHA_MARVEL <span style="color:#ca60ca;">||</span> ALPHA_TSUNAMI<span style="color:#ca60ca;">)</span>
95 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">y</span>
96 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">n</span>
97 <span style="color:#006e28;">default</span> 3
98 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Use WTINT&quot;</span> <span style="font-weight:bold;">if</span> ALPHA_SRM <span style="color:#ca60ca;">||</span> ALPHA_GENERIC
99 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">y</span> <span style="font-weight:bold;">if</span> ALPHA_QEMU
100 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">n</span> <span style="font-weight:bold;">if</span> ALPHA_EV5 <span style="color:#ca60ca;">||</span> ALPHA_EV56 <span style="color:#ca60ca;">||</span> <span style="color:#ca60ca;">(</span>ALPHA_EV4 <span style="color:#ca60ca;">&amp;&amp;</span> <span style="color:#ca60ca;">!</span>ALPHA_LCA<span style="color:#ca60ca;">)</span>
101 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">n</span> <span style="font-weight:bold;">if</span> <span style="color:#ca60ca;">!</span>ALPHA_SRM <span style="color:#ca60ca;">&amp;&amp;</span> <span style="color:#ca60ca;">!</span>ALPHA_GENERIC
102 <span style="color:#006e28;">default</span> <span style="color:#aa5500;">y</span> <span style="font-weight:bold;">if</span> SMP
103 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">&quot;y&quot;</span> <span style="font-weight:bold;">if</span> PPC_POWERNV
104 <span style="color:#006e28;">range</span> 2 32
105 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> SMP
106 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">&quot;32&quot;</span> <span style="font-weight:bold;">if</span> ALPHA_GENERIC <span style="color:#ca60ca;">||</span> ALPHA_MARVEL
107 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">'4'</span> <span style="font-weight:bold;">if</span> <span style="color:#ca60ca;">!</span>ALPHA_GENERIC <span style="color:#ca60ca;">&amp;&amp;</span> <span style="color:#ca60ca;">!</span>ALPHA_MARVEL
108 <span style="color:#006e28;">help</span>
109 <span style="color:#e31616;"> Support VGA on an arbitrary hose; needed for several platforms</span>
110 <span style="color:#e31616;"> which always have multiple hoses, and whose consoles support it.</span>
111
112 <span style="font-weight:bold;">endmenu</span>
113
114 <span style="font-weight:bold;">menu</span> <span style="color:#bf0303;">&quot;ARC Architecture Configuration&quot;</span>
115
116 <span style="font-weight:bold;">menu</span> <span style="color:#bf0303;">&quot;ARC Platform/SoC/Board&quot;</span>
117
118 <span style="color:#898887;">#New platform adds here</span>
119 <span style="color:#006e28;">source</span> <span style="color:#bf0303;">&quot;arch/arc/plat-eznps/Kconfig&quot;</span>
120 <span style="color:#006e28;">source</span> <span style="color:#bf0303;">'arch/arc/plat-hsdk/Kconfig'</span>
121
122 <span style="font-weight:bold;">endmenu</span>
123
124 <span style="font-weight:bold;">menu</span> <span style="color:#bf0303;">&quot;ARC CPU Configuration&quot;</span>
125
126 <span style="font-weight:bold;">choice</span>
127 <span style="color:#006e28;">prompt</span> <span style="color:#bf0303;">&quot;ARC Core&quot;</span>
128 <span style="color:#006e28;">default</span> ARC_CPU_HS <span style="font-weight:bold;">if</span> ISA_ARCV2
129 <span style="color:#006e28;">help</span>
130 <span style="color:#e31616;"> bla bla</span>
131
132 <span style="font-weight:bold;">if</span> ISA_ARCOMPACT
133
134 <span style="font-weight:bold;">config</span> ARC_CPU_750D
135 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;ARC750D&quot;</span>
136 <span style="color:#006e28;">select</span> ARC_CANT_LLSC
137 <span style="color:#006e28;">help</span>
138 <span style="color:#e31616;"> Support for ARC750 core</span>
139
140 <span style="font-weight:bold;">endif</span> <span style="color:#898887;">#ISA_ARCOMPACT</span>
141
142 <span style="font-weight:bold;">endchoice</span>
143
144 <span style="font-weight:bold;">if</span> SMP
145
146 <span style="font-weight:bold;">config</span> NR_CPUS
147 <span style="color:#0057ae;">int</span> <span style="color:#bf0303;">&quot;Maximum number of CPUs (2-4096)&quot;</span>
148 <span style="color:#006e28;">range</span> 2 4096
149 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">&quot;4&quot;</span>
150
151 <span style="font-weight:bold;">endif</span> <span style="color:#898887;">#SMP</span>
152
153 <span style="font-weight:bold;">config</span> ARC_MMU_V4
154 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;MMU v4&quot;</span>
155 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> ISA_ARCV2
156
157 <span style="font-weight:bold;">endmenu</span> <span style="color:#898887;"># &quot;ARC CPU Configuration&quot;</span>
158
159 <span style="font-weight:bold;">menuconfig</span> ARC_PLAT_EZNPS
160 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;</span><span style="color:#3daee9;">\&quot;</span><span style="color:#bf0303;">EZchip</span><span style="color:#3daee9;">\&quot;</span><span style="color:#bf0303;"> ARC dev platform&quot;</span>
161 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> ISA_ARCOMPACT
162 <span style="color:#006e28;">select</span> CPU_BIG_ENDIAN
163 <span style="color:#006e28;">select</span> CLKSRC_NPS <span style="font-weight:bold;">if</span> <span style="color:#ca60ca;">!</span>PHYS_ADDR_T_64BIT
164 <span style="color:#006e28;">help</span>
165 <span style="color:#e31616;"> Support for EZchip development platforms,</span>
166 <span style="color:#e31616;"> based on ARC700 cores.</span>
167 <span style="color:#e31616;"> We handle few flavors:</span>
168 <span style="color:#e31616;"> - Hardware Emulator AKA HE which is FPGA based chassis</span>
169 <span style="color:#e31616;"> - Simulator based on MetaWare nSIM</span>
170 <span style="color:#e31616;"> - NPS400 chip based on ASIC</span>
171
172 <span style="color:#898887;"># </span><span style="color:#ca60ca;font-style:italic;">SPDX-License-Identifier:</span><span style="color:#ca60ca;font-style:italic;"> </span><span style="color:#ca60ca;font-style:italic;">GPL-2.0-only</span>
173 <span style="font-weight:bold;">config</span> ARM64
174 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> <span style="color:#aa5500;">y</span>
175 <span style="color:#006e28;">select</span> HAVE_DYNAMIC_FTRACE_WITH_REGS \
176 <span style="font-weight:bold;">if</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">cc-option</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">-fpatchable-function-entry=2</span><span style="color:#924c9d;">)</span>
177 <span style="color:#006e28;">select</span> HAVE_EFFICIENT_UNALIGNED_ACCESS
178 <span style="color:#006e28;">help</span>
179 <span style="color:#e31616;"> ARM 64-bit (AArch64) Linux support.</span>
180
181 <span style="font-weight:bold;">config</span> PHYS_OFFSET
182 <span style="color:#0057ae;">hex</span> <span style="color:#bf0303;">&quot;Physical address of main memory&quot;</span> <span style="font-weight:bold;">if</span> MMU
183 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> <span style="color:#ca60ca;">!</span>ARM_PATCH_PHYS_VIRT
184 <span style="color:#006e28;">default</span> DRAM_BASE <span style="font-weight:bold;">if</span> <span style="color:#ca60ca;">!</span>MMU
185 <span style="color:#006e28;">default</span> 0x00000000 <span style="font-weight:bold;">if</span> ARCH_EBSA110 <span style="color:#ca60ca;">||</span> \
186 ARCH_FOOTBRIDGE <span style="color:#ca60ca;">||</span> \
187 ARCH_INTEGRATOR <span style="color:#ca60ca;">||</span> \
188 ARCH_REALVIEW
189 <span style="color:#006e28;">default</span> 0x10000000 <span style="font-weight:bold;">if</span> ARCH_OMAP1 <span style="color:#ca60ca;">||</span> ARCH_RPC
190 <span style="color:#006e28;">default</span> 0x20000000 <span style="font-weight:bold;">if</span> ARCH_S5PV210
191 <span style="color:#006e28;">default</span> 0xc0000000 <span style="font-weight:bold;">if</span> ARCH_SA1100
192 <span style="color:#006e28;">help</span>
193 <span style="color:#e31616;"> Please provide the physical address corresponding to the</span>
194 <span style="color:#e31616;"> location of main memory in your system.</span>
195
196 <span style="font-weight:bold;">comment</span> <span style="color:#bf0303;">&quot;S3C2416 Boards&quot;</span>
197
198 <span style="font-weight:bold;">config</span> KERNEL_RAM_BASE_ADDRESS
199 <span style="color:#0057ae;">hex</span> <span style="color:#bf0303;">&quot;Virtual address of memory base&quot;</span>
200 <span style="color:#006e28;">default</span> 0xe0000000 <span style="font-weight:bold;">if</span> SOC_TMS320C6455
201 <span style="color:#006e28;">default</span> 0xe0000000 <span style="font-weight:bold;">if</span> SOC_TMS320C6457
202
203 <span style="font-weight:bold;">config</span> CC_IS_GCC
204 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">success</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">echo &quot;</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC_VERSION_TEXT</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;">&quot; | grep -q gcc</span><span style="color:#924c9d;">)</span>
205
206 <span style="color:#bf0303;text-decoration:underline;">endif # error</span>
207
208 <span style="color:#898887;"># next line caused hang, see https://phabricator.kde.org/D18509</span>
209 <span style="font-weight:bold;">menu</span>
210
211 <span style="color:#898887;"># the next lines should all be fine</span>
212 <span style="color:#0057ae;">plain</span><span style="color:#924c9d;">:=</span><span style="color:#bf0303;">plain_value</span>
213 <span style="color:#0057ae;">with_whitespace</span> <span style="color:#924c9d;">:=</span> <span style="color:#bf0303;">plain value whitespace</span>
214 <span style="color:#0057ae;">value_with_expansion</span> <span style="color:#924c9d;">:=</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">ARCH</span><span style="color:#924c9d;">)</span>
215 <span style="color:#0057ae;">plain_expansion_mix</span> <span style="color:#924c9d;">:=</span> <span style="color:#bf0303;">Linux/</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">ARCH</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;"> </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">KERNELVERSION</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;"> Kernel Configuration</span>
216
217 <span style="color:#898887;"># function definition</span>
218 <span style="color:#0057ae;">cc-option-bit</span> <span style="color:#924c9d;">=</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">if-success</span><span style="font-weight:bold;">,</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;"> -Werror </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">1</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;"> -E -x c /dev/null -o /dev/null</span><span style="font-weight:bold;">,</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">1</span><span style="color:#924c9d;">))</span>
219
220 <span style="color:#898887;"># function call</span>
221 <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">cc-option-bit</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">-m64</span><span style="color:#924c9d;">)</span>
222
223 <span style="color:#898887;"># function call and storing the result</span>
224 <span style="color:#0057ae;">m32-flag</span> <span style="color:#924c9d;">:=</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">cc-option-bit</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">-m32</span><span style="color:#924c9d;">)</span>
225
226 <span style="color:#898887;"># call to known function</span>
227 <span style="color:#0057ae;">name</span> <span style="color:#924c9d;">:=</span> <span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">filename</span><span style="color:#924c9d;">)</span>
228
229 <span style="color:#898887;"># call to known function with arguments</span>
230 <span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">warning-if</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">y</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">hello world 1</span><span style="color:#924c9d;">)</span>
231
232 <span style="color:#898887;"># ... with nested expansions</span>
233 <span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">error-if</span><span style="font-weight:bold;">,</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">success</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;"> </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">LD</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;"> -v | grep -q gold</span><span style="color:#924c9d;">)</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;"> gold linker '</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">LD</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;">' not supported</span><span style="color:#924c9d;">)</span>
234
235 <span style="color:#898887;"># expansion in different contexts</span>
236 <span style="font-weight:bold;">config</span> FOO_<span style="color:#924c9d;">$(</span><span style="color:#0057ae;">BAR</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">BAZ</span><span style="color:#924c9d;">))</span>
237 <span style="color:#0057ae;">int</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">filename</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;">&quot;</span>
238 <span style="color:#006e28;">default</span> <span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">lineno</span><span style="color:#924c9d;">)</span> <span style="font-weight:bold;">if</span> <span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">lineno</span><span style="color:#924c9d;">)</span> <span style="color:#ca60ca;">&gt;=</span> 5
239
240 <span style="font-weight:bold;">menu</span> <span style="color:#bf0303;">&quot;A MENU&quot;</span>
241 <span style="color:#006e28;">visible</span> <span style="color:#006e28;">if</span> 01 <span style="color:#ca60ca;">&gt;</span> 00
242
243 <span style="font-weight:bold;">config</span> A_BOOL
244 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> <span style="color:#aa5500;">y</span> <span style="color:#ca60ca;">&amp;&amp;</span> <span style="color:#aa5500;">m</span> <span style="color:#ca60ca;">||</span> !!<span style="color:#ca60ca;">(</span>!<span style="color:#ca60ca;">(</span>!!<span style="color:#aa5500;">n</span><span style="color:#ca60ca;">))</span> <span style="color:#ca60ca;">||</span> <span style="color:#bf0303;">&quot;</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">foo</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;">&quot;</span>
245
246 <span style="font-weight:bold;">endmenu</span>
247
248 <span style="color:#898887;"># Advanced real world example taken from init/Kconfig in Linux 5.10:</span>
249 <span style="color:#898887;"># Invoke the system shell /bin/sh with a command to pipe a C program with an</span>
250 <span style="color:#898887;"># asm goto statement to the C compiler that is set by the environment. If the</span>
251 <span style="color:#898887;"># exit code is 0 then set the default value of CC_HAS_ASM_GOTO_OUTPUT to y,</span>
252 <span style="color:#898887;"># otherwise to n.</span>
253 <span style="font-weight:bold;">config</span> CC_HAS_ASM_GOTO_OUTPUT
254 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> CC_HAS_ASM_GOTO
255 <span style="color:#006e28;">def_</span><span style="color:#0057ae;">bool</span> <span style="color:#924c9d;">$(</span><span style="color:#0057ae;">success</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">echo 'int foo(int x) { asm goto (&quot;&quot;: &quot;=r&quot;(x) ::: bar); return x; bar: return 0; }' | </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;"> -x c - -c -o /dev/null</span><span style="color:#924c9d;">)</span>
256
257 <span style="color:#898887;"># Real world example with irregular indentation</span>
258 <span style="font-weight:bold;">config</span> W1_MASTER_DS2490
259 <span style="color:#0057ae;">tristate</span> <span style="color:#bf0303;">&quot;DS2490 USB &lt;-&gt; W1 transport layer for 1-wire&quot;</span>
260 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> USB
261 <span style="color:#006e28;">help</span>
262 <span style="color:#e31616;"> Say Y here if you want to have a driver for DS2490 based USB &lt;-&gt; W1 bridges,</span>
263 <span style="color:#e31616;"> for example DS9490*.</span>
264
265 <span style="color:#e31616;"> This support is also available as a module. If so, the module</span>
266 <span style="color:#e31616;"> will be called ds2490.</span>
267
268 <span style="color:#898887;"># synthetic example</span>
269 <span style="color:#0057ae;">to_upper</span><span style="color:#924c9d;">=</span><span style="color:#924c9d;">$(</span><span style="color:#644a9b;font-weight:bold;">shell</span><span style="font-weight:bold;">,</span><span style="color:#0057ae;">echo </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">1</span><span style="color:#924c9d;">)</span><span style="color:#0057ae;"> | tr [:lower:] [:upper:]</span><span style="color:#924c9d;">)</span>
270
271 <span style="font-weight:bold;">config</span> ARGS_<span style="color:#924c9d;">$(</span><span style="color:#0057ae;">to_upper</span><span style="font-weight:bold;">,</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC</span><span style="color:#924c9d;">))</span>
272 <span style="color:#0057ae;">string</span> <span style="color:#bf0303;">&quot;Arguments for the current compiler </span><span style="color:#3daee9;">\&quot;</span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC</span><span style="color:#924c9d;">)</span><span style="color:#3daee9;">\&quot;</span><span style="color:#bf0303;">&quot;</span>
273 <span style="color:#006e28;">help</span>
274 <span style="color:#e31616;"> This is a bad idea.</span>
275 <span style="color:#e31616;"> See &lt;</span><span style="color:#006e28;">file:Documentation/completely/made-up.rst</span><span style="color:#e31616;">&gt;</span>
276
277 <span style="color:#898887;"># binary operator in expression of an if statement</span>
278 <span style="font-weight:bold;">if</span> CPU_SUPPORTS_CPUFREQ <span style="color:#ca60ca;">&amp;&amp;</span> MIPS_EXTERNAL_TIMER
279 <span style="color:#006e28;">source</span> <span style="color:#bf0303;">&quot;drivers/cpufreq/Kconfig&quot;</span>
280 <span style="font-weight:bold;">endif</span>
281
282 <span style="color:#898887;"># alert on characters (here a colon) that are ignored (taken from axTLS 2.1.5)</span>
283 <span style="font-weight:bold;">config</span> CONFIG_LUA_CORE
284 <span style="color:#0057ae;">string</span> <span style="color:#bf0303;">&quot;Location of Lua CORE&quot;</span>
285 <span style="color:#006e28;">default</span> <span style="color:#bf0303;">&quot;/usr/local&quot;</span>
286 <span style="color:#006e28;">help</span><span style="color:#bf0303;background-color:#f7e6e6;font-weight:bold;">:</span>
287 <span style="color:#e31616;"> If the Lua exists on another directory then this needs to be changed</span>
288
289 <span style="font-weight:bold;">comment</span> <span style="color:#bf0303;">&quot;Comment texts know expansions, too: </span><span style="color:#924c9d;">$(</span><span style="color:#0057ae;">CC</span><span style="color:#924c9d;">)</span><span style="color:#bf0303;">, and the depends property:&quot;</span>
290 <span style="color:#006e28;">depends</span> <span style="color:#006e28;">on</span> A_BOOL
291
292 <span style="color:#898887;"># &quot;boolean&quot; is now a free variable name ...</span>
293 <span style="color:#0057ae;text-decoration:line-through;">boolean</span><span style="color:#924c9d;">=</span><span style="color:#bf0303;">foo</span>
294 <span style="color:#898887;"># ... but it looks like a bad idea. This may be disputed.</span>
295
296 <span style="font-weight:bold;">menuconfig</span> MODULES
297 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;Enable loadable module support&quot;</span>
298 <span style="color:#006e28;">modules</span>
299
300 <span style="color:#898887;"># the three modern options</span>
301 <span style="font-weight:bold;">config</span> OPTIONS
302 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#006e28;text-decoration:line-through;">allnoconfig_y</span>
303 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#006e28;">modules</span>
304 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#006e28;text-decoration:line-through;">defconfig_list</span>
305
306 <span style="color:#898887;"># old option &quot;env&quot; and obsolete custom options</span>
307 <span style="font-weight:bold;">config</span> OPTIONS
308 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#006e28;text-decoration:line-through;">env</span><span style="color:#ca60ca;text-decoration:line-through;">=</span><span style="color:#bf0303;text-decoration:line-through;">ARCH</span>
309 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#bf0303;background-color:#f7e6e6;font-weight:bold;font-style:italic;">custom-without-argument</span>
310 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#bf0303;background-color:#f7e6e6;font-weight:bold;font-style:italic;">custom-with-argument</span><span style="color:#ca60ca;text-decoration:line-through;">=</span><span style="color:#bf0303;text-decoration:line-through;">ABC</span>
311
312 <span style="color:#898887;"># old syntax</span>
313 <span style="font-weight:bold;">menu</span> <span style="text-decoration:line-through;">OLD_STYLE_PROMPT</span>
314 <span style="color:#006e28;">visible</span> <span style="color:#006e28;">if</span> CPU_SUPPORTS_CPUFREQ
315
316 <span style="color:#898887;"># busybox 1.31.1</span>
317 <span style="color:#006e28;">source</span> <span style="color:#bf0303;text-decoration:line-through;">libbb/Config.in</span>
318
319 <span style="color:#898887;"># uClibc-ng-1.0.37</span>
320 <span style="font-weight:bold;">config</span> DESIRED_TARGET_ARCH
321 <span style="color:#0057ae;">string</span>
322 <span style="font-weight:bold;text-decoration:line-through;">option</span> <span style="color:#006e28;text-decoration:line-through;">env</span><span style="color:#ca60ca;text-decoration:line-through;">=</span><span style="color:#bf0303;text-decoration:line-through;">&quot;ARCH&quot;</span>
323
324 <span style="font-weight:bold;">config</span> OLD_HELP
325 <span style="color:#0057ae;">hex</span>
326 <span style="color:#006e28;text-decoration:line-through;">---help---</span>
327 <span style="color:#e31616;"> old help property</span>
328 <span style="color:#e31616;"> </span><span style="color:#006e28;">default</span> 0x1CEC0FEE
329 <span style="font-weight:bold;">endmenu</span>
330
331 <span style="color:#898887;"># a few errors</span>
332 <span style="color:#0057ae;text-decoration:line-through;">allnoconfig_y</span>
333 <span style="color:#bf0303;text-decoration:underline;">bool</span>
334 <span style="color:#bf0303;text-decoration:underline;">def_bool</span>
335 <span style="color:#bf0303;text-decoration:underline;">def_tristate</span>
336 <span style="color:#bf0303;text-decoration:underline;">default</span>
337 <span style="color:#0057ae;text-decoration:line-through;">defconfig_list</span>
338 <span style="color:#bf0303;text-decoration:underline;">depends</span>
339 <span style="color:#bf0303;text-decoration:underline;">endchoice</span>
340 <span style="color:#bf0303;text-decoration:underline;">endif</span>
341 <span style="color:#bf0303;text-decoration:underline;">help</span>
342 <span style="color:#bf0303;text-decoration:underline;">hex</span>
343 <span style="color:#bf0303;text-decoration:underline;">imply</span>
344 <span style="color:#bf0303;text-decoration:underline;">int</span>
345 <span style="color:#bf0303;text-decoration:underline;">mainmenu</span>
346 <span style="color:#bf0303;text-decoration:underline;">modules</span>
347 <span style="color:#bf0303;text-decoration:underline;">on</span>
348 <span style="color:#0057ae;text-decoration:line-through;">option</span>
349 <span style="color:#bf0303;text-decoration:underline;">optional</span>
350 <span style="color:#bf0303;text-decoration:underline;">prompt</span>
351 <span style="color:#bf0303;text-decoration:underline;">range</span>
352 <span style="color:#bf0303;text-decoration:underline;">select</span>
353 <span style="color:#bf0303;text-decoration:underline;">string</span>
354 <span style="color:#bf0303;text-decoration:underline;">tristate</span>
355 <span style="color:#bf0303;text-decoration:underline;">visible</span>
356
357 <span style="font-weight:bold;">config</span> OK
358 <span style="color:#0057ae;">bool</span> <span style="color:#bf0303;">&quot;still OK&quot;</span>
359 <span style="color:#006e28;">help</span>
360 <span style="color:#e31616;"> still OK</span>
361 <span style="color:#bf0303;text-decoration:underline;">now=fail</span>
362 <span style="color:#0057ae;">andNow</span><span style="color:#924c9d;">=</span><span style="color:#bf0303;">OK</span>
363 </pre></body></html>