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
26 HREF="ref.no-define.html"><LINK
29 HREF="ref.requires.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
60 HREF="ref.no-define.html"
74 HREF="ref.requires.html"
85 NAME="REF.PARENT"><SPAN
99 > -- Control the location of an option in the configuration hierarchy.</DIV
101 CLASS="REFSYNOPSISDIV"
113 >cdl_option <name> {
114 parent <component or package>
129 >Configuration options live in a hierarchy of packages and components.
130 By default a given option's position in the hierarchy is a simple
131 consequence of its position within the CDL scripts. Packages are
132 generally placed at the top-level of the configuration. Any components
133 or options that are defined at the same level as the <TT
137 command in a package's top-level CDL script are placed immediately
138 below that package in the hierarchy. Any options or components that
139 are defined in the body of a <TT
146 or that are read in as a result of processing a component's <SPAN
150 property, will be placed immediately below that package or component
153 >In some circumstances it is useful to specify an alternative position
154 in the hierarchy for a given option. For example it is often
155 convenient to re-parent device driver packages below
159 > in the configuration hierarchy, thus
160 reducing the number of packages at the top level of the hierarchy and
161 making navigation easier. The <SPAN
164 > property can be used to achieve
170 > property takes a single argument, which should be the
171 name of a package or component. The body of a <TT
175 CDL entity can contain at most one <SPAN
183 > property affects an option's position in the
184 overall hierarchy and hence whether or not that option is active, a
185 re-parented option still belongs to the package that defines it. By
189 > will be exported to that
190 package's configuration header file. Any <SPAN
193 > properties can only
194 reference source files present in that package, and it is not directly
195 possible to cause some file in another package to be built by
198 >As a special case, if an empty string is specified for the parent then
199 the option is placed at the top of the hierarchy, ahead of any
200 packages which are not explicitly re-parented in this way. This
201 facility is useful for configuration options such as global
202 preferences and default compiler flags.</P
210 >If an option is re-parented somewhere below another package and that
211 other package is not actually loaded, the option is an orphan and its
212 active/inactive state is undefined. In such cases it is a good idea
213 for the owning package to require the presence of the other one.
214 Unfortunately this technique does not work if a package as a whole is
215 reparented below another one that has not been loaded: the package is
216 orphaned so it may be automatically inactive, and hence any <SPAN
220 properties would have no effect.</P
238 CLASS="PROGRAMLISTING"
239 >cdl_package CYGPKG_HAL_I386 {
240 display "i386 architecture"
244 define_header hal_i386.h
248 cdl_component CYGBLD_GLOBAL_OPTIONS {
249 display "Global build options"
266 HREF="ref.script.html"
273 HREF="ref.cdl-component.html"
280 HREF="ref.cdl-package.html"
292 SUMMARY="Footer navigation table"
303 HREF="ref.no-define.html"
312 HREF="cdl-guide.html"
321 HREF="ref.requires.html"
340 HREF="reference.html"