1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
22 TITLE="CDL Language Specification"
23 HREF="reference.html"><LINK
25 TITLE="CDL Language Specification"
26 HREF="reference.html"><LINK
29 HREF="ref.cdl-component.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
74 HREF="ref.cdl-component.html"
85 NAME="REF.CDL-OPTION"><TT
99 > -- Define a single configuration option</DIV
101 CLASS="REFSYNOPSISDIV"
113 >cdl_option <name> {
128 >The option is the basic unit of configurability. Generally each option
129 corresponds to a single user choice. Typically there is a certain
130 amount of information associated with an option to assist the user in
131 manipulating that option, for example a textual description. There
132 will also be some limits on the possible values that the user can
133 choose, so an option may be a simple yes-or-no choice or it may be
134 something more complicated such as an array size or a device name.
135 Options may have associated constraints, so if that option is enabled
136 then certain conditions have to satisfied elsewhere in the
137 configuration. Options usually have direct consequences such as
141 > symbols in a configuration
147 > is implemented as a Tcl command that takes two arguments,
148 a name and a body. The name must be a valid C preprocessor identifier:
149 a sequence of upper or lower case letters, digits or underscores,
150 starting with a non-digit character; identifiers beginning with an
151 underscore should normally be avoided because they may clash with
152 system packages or with identifiers reserved for use by the compiler.
153 Within a single configuration, names must be unique. If a
154 configuration contained two packages which defined the same entity
157 >CYGIMP_SOME_OPTION</TT
158 >, any references to that entity
162 > property or any other expression
163 would be ambiguous. It is possible for a given name to be used by two
164 different packages if those packages should never be loaded into a
165 single configuration. For example, architectural HAL packages are
166 allowed to re-use names because a single configuration cannot target
167 two different architectures. For a recommended naming convention see
169 HREF="package.contents.html"
170 >the Section called <I
171 >Package Contents and Layout</I
175 >The second argument to <TT
179 properties, typically surrounded by braces so that the Tcl interpreter
180 treats it as a single argument. This body will be processed by a
181 recursive invocation of the Tcl interpreter, extended with additional
182 commands for the various properties that are allowed inside a
186 >. The valid properties are:</P
194 HREF="ref.active-if.html"
202 >Allow additional control over the active state of this option.</P
206 HREF="ref.calculated.html"
214 >The option's value is not directly user-modifiable, it is calculated
215 using a suitable CDL expression.</P
219 HREF="ref.compile.html"
227 >List the source files that should be built if this option is active
232 HREF="ref.default-value.html"
240 >Provide a default value for this option using a CDL expression.</P
244 HREF="ref.define.html"
252 >Specify additional <TT
255 > symbols that should go
256 into the owning package's configuration header file.</P
260 HREF="ref.define-format.html"
268 >Control how the option's value will appear in the configuration header
273 HREF="ref.define-proc.html"
281 >Use a fragment of Tcl code to output additional data to
282 configuration header files.</P
286 HREF="ref.description.html"
294 >Provide a textual description for this option.</P
298 HREF="ref.display.html"
306 >Provide a short string describing this option.</P
318 >The location of on-line documentation for this option.</P
322 HREF="ref.flavor.html"
330 >Specify the nature of this option.</P
334 HREF="ref.if-define.html"
342 >Output a common preprocessor construct to a configuration header file. </P
346 HREF="ref.implements.html"
354 >Enabling this option provides one instance of a more general
359 HREF="ref.legal-values.html"
367 >Impose constraints on the possible values for this option.</P
379 >An additional custom build step associated with this option, resulting
380 in a target that should not go directly into a library.</P
384 HREF="ref.make-object.html"
392 >An additional custom build step associated with this option, resulting
393 in an object file that should go into a library.</P
397 HREF="ref.no-define.html"
405 >Suppress the normal generation of a preprocessor
409 > symbol in a configuration header file.</P
413 HREF="ref.parent.html"
421 >Control the location of this option in the configuration hierarchy. </P
425 HREF="ref.requires.html"
433 >List constraints that the configuration should satisfy if this option is
434 active and enabled.</P
453 CLASS="PROGRAMLISTING"
454 >cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {
455 display "Preconditions"
458 This option allows individual control of preconditions.
459 A precondition is one type of assert, which it is
460 useful to control separately from more general asserts.
461 The function is CYG_PRECONDITION(condition,msg)."
476 HREF="ref.cdl-component.html"
483 HREF="ref.cdl-package.html"
490 HREF="ref.cdl-interface.html"
502 SUMMARY="Footer navigation table"
513 HREF="reference.html"
522 HREF="cdl-guide.html"
531 HREF="ref.cdl-component.html"
541 >CDL Language Specification</TD
547 HREF="reference.html"