Command cdl_component -- Define a component, a collection of configuration options
Synopsis
cdl_component <name> {
…
}
Description
A component is a configuration option that can contain additional
options and sub-components. The body of a cdl_component can contain
the same properties as that of a cdl_option. There is an additional
property, script which allows configuration data to be split into
multiple files. It is also possible for a component body to include
cdl_component, cdl_option and cdl_interface entities that should
go below this component in the configuration hierarchy.
cdl_component is implemented as a Tcl command that takes two
arguments, a name and a body. The name must be a valid C preprocessor
identifier: a sequence of upper or lower case letters, digits or
underscores, starting with a non-digit character; identifiers
beginning with an underscore should normally be avoided because they
may clash with system packages or with identifiers reserved for use by
the compiler. Within a single configuration, names must be unique. If
a configuration contained two packages which defined the same entity
CYGIMP_SOME_OPTION, any references to that entity
in a requires property or any other expression would be ambiguous.
It is possible for a given name to be used by two different packages
if those packages should never be loaded into a single configuration.
For example, architectural HAL packages are allowed to re-use certain
names because a single configuration cannot target two different
architectures. For a recommended naming convention see the Section called Package Contents and Layout in Chapter 2.
The second argument to cdl_component is a body of properties and
other commands, typically surrounded by braces so that the Tcl
interpreter treats it as a single argument. This body will be
processed by a recursive invocation of the Tcl interpreter, extended
with additional commands for the various properties that are allowed
inside a cdl_component. The valid commands are:
Include additional configuration information from another
CDL script
Example
cdl_component CYGDBG_USE_ASSERTS {
display "Use asserts"
default_value 1
description "
If this component is enabled, assertions in the code are
tested at run-time. Assert functions (CYG_ASSERT()) are
defined in 'include/cyg/infra/cyg_ass.h' within the 'install'
tree. If the component is disabled, these result in no
additional object code and no checking of the asserted
conditions."
script assert.cdl
}