OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [cdl-guide/] [ref.parent.html] - Blame information for rev 588

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- 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.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>parent</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="The eCos Component Writer's Guide"
20
HREF="cdl-guide.html"><LINK
21
REL="UP"
22
TITLE="CDL Language Specification"
23
HREF="reference.html"><LINK
24
REL="PREVIOUS"
25
TITLE="no_define"
26
HREF="ref.no-define.html"><LINK
27
REL="NEXT"
28
TITLE="requires"
29
HREF="ref.requires.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>The <SPAN
50
CLASS="APPLICATION"
51
>eCos</SPAN
52
> Component Writer's Guide</TH
53
></TR
54
><TR
55
><TD
56
WIDTH="10%"
57
ALIGN="left"
58
VALIGN="bottom"
59
><A
60
HREF="ref.no-define.html"
61
ACCESSKEY="P"
62
>Prev</A
63
></TD
64
><TD
65
WIDTH="80%"
66
ALIGN="center"
67
VALIGN="bottom"
68
></TD
69
><TD
70
WIDTH="10%"
71
ALIGN="right"
72
VALIGN="bottom"
73
><A
74
HREF="ref.requires.html"
75
ACCESSKEY="N"
76
>Next</A
77
></TD
78
></TR
79
></TABLE
80
><HR
81
ALIGN="LEFT"
82
WIDTH="100%"></DIV
83
><H1
84
><A
85
NAME="REF.PARENT"><SPAN
86
CLASS="PROPERTY"
87
>parent</SPAN
88
></H1
89
><DIV
90
CLASS="REFNAMEDIV"
91
><A
92
NAME="AEN4877"
93
></A
94
><H2
95
>Name</H2
96
>Property <SPAN
97
CLASS="PROPERTY"
98
>parent</SPAN
99
>&nbsp;--&nbsp;Control the location of an option in the configuration hierarchy.</DIV
100
><DIV
101
CLASS="REFSYNOPSISDIV"
102
><A
103
NAME="AEN4881"><H2
104
>Synopsis</H2
105
><TABLE
106
BORDER="5"
107
BGCOLOR="#E0E0F0"
108
WIDTH="70%"
109
><TR
110
><TD
111
><PRE
112
CLASS="SYNOPSIS"
113
>cdl_option &lt;name&gt; {
114
    parent &lt;component or package&gt;
115
    &#8230;
116
}</PRE
117
></TD
118
></TR
119
></TABLE
120
></DIV
121
><DIV
122
CLASS="REFSECT1"
123
><A
124
NAME="AEN4883"
125
></A
126
><H2
127
>Description</H2
128
><P
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
134
CLASS="LITERAL"
135
>cdl_package</TT
136
>
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
140
CLASS="LITERAL"
141
>cdl_package</TT
142
> or <TT
143
CLASS="LITERAL"
144
>cdl_component</TT
145
> command,
146
or that are read in as a result of processing a component's <SPAN
147
CLASS="PROPERTY"
148
>script</SPAN
149
>
150
property, will be placed immediately below that package or component
151
in the hierarchy.</P
152
><P
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
156
<TT
157
CLASS="VARNAME"
158
>CYGPKG_IO</TT
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
162
CLASS="PROPERTY"
163
>parent</SPAN
164
> property can be used to achieve
165
this. </P
166
><P
167
>The <SPAN
168
CLASS="PROPERTY"
169
>parent</SPAN
170
> property takes a single argument, which should be the
171
name of a package or component. The body of a <TT
172
CLASS="LITERAL"
173
>cdl_option</TT
174
> or other
175
CDL entity can contain at most one <SPAN
176
CLASS="PROPERTY"
177
>parent</SPAN
178
> property.</P
179
><P
180
>Although the <SPAN
181
CLASS="PROPERTY"
182
>parent</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
186
default any <TT
187
CLASS="LITERAL"
188
>#define's</TT
189
> will be exported to that
190
package's configuration header file. Any <SPAN
191
CLASS="PROPERTY"
192
>compile</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
196
re-parenting. </P
197
><P
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
203
><DIV
204
CLASS="TIP"
205
><BLOCKQUOTE
206
CLASS="TIP"
207
><P
208
><B
209
>Tip: </B
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
217
CLASS="PROPERTY"
218
>requires</SPAN
219
>
220
properties would have no effect.</P
221
></BLOCKQUOTE
222
></DIV
223
></DIV
224
><DIV
225
CLASS="REFSECT1"
226
><A
227
NAME="AEN4905"
228
></A
229
><H2
230
>Example</H2
231
><TABLE
232
BORDER="5"
233
BGCOLOR="#E0E0F0"
234
WIDTH="70%"
235
><TR
236
><TD
237
><PRE
238
CLASS="PROGRAMLISTING"
239
>cdl_package CYGPKG_HAL_I386 {
240
    display       "i386 architecture"
241
    parent        CYGPKG_HAL
242
    hardware
243
    include_dir   cyg/hal
244
    define_header hal_i386.h
245
    &#8230;
246
}
247
 
248
cdl_component CYGBLD_GLOBAL_OPTIONS {
249
    display       "Global build options"
250
    parent        ""
251
    &#8230;
252
}</PRE
253
></TD
254
></TR
255
></TABLE
256
></DIV
257
><DIV
258
CLASS="REFSECT1"
259
><A
260
NAME="AEN4908"
261
></A
262
><H2
263
>See Also</H2
264
><P
265
>Property <A
266
HREF="ref.script.html"
267
><SPAN
268
CLASS="PROPERTY"
269
>script</SPAN
270
></A
271
>,
272
commands <A
273
HREF="ref.cdl-component.html"
274
><TT
275
CLASS="LITERAL"
276
>cdl_component</TT
277
></A
278
> and
279
<A
280
HREF="ref.cdl-package.html"
281
><TT
282
CLASS="LITERAL"
283
>cdl_package</TT
284
></A
285
>.</P
286
></DIV
287
><DIV
288
CLASS="NAVFOOTER"
289
><HR
290
ALIGN="LEFT"
291
WIDTH="100%"><TABLE
292
SUMMARY="Footer navigation table"
293
WIDTH="100%"
294
BORDER="0"
295
CELLPADDING="0"
296
CELLSPACING="0"
297
><TR
298
><TD
299
WIDTH="33%"
300
ALIGN="left"
301
VALIGN="top"
302
><A
303
HREF="ref.no-define.html"
304
ACCESSKEY="P"
305
>Prev</A
306
></TD
307
><TD
308
WIDTH="34%"
309
ALIGN="center"
310
VALIGN="top"
311
><A
312
HREF="cdl-guide.html"
313
ACCESSKEY="H"
314
>Home</A
315
></TD
316
><TD
317
WIDTH="33%"
318
ALIGN="right"
319
VALIGN="top"
320
><A
321
HREF="ref.requires.html"
322
ACCESSKEY="N"
323
>Next</A
324
></TD
325
></TR
326
><TR
327
><TD
328
WIDTH="33%"
329
ALIGN="left"
330
VALIGN="top"
331
><SPAN
332
CLASS="PROPERTY"
333
>no_define</SPAN
334
></TD
335
><TD
336
WIDTH="34%"
337
ALIGN="center"
338
VALIGN="top"
339
><A
340
HREF="reference.html"
341
ACCESSKEY="U"
342
>Up</A
343
></TD
344
><TD
345
WIDTH="33%"
346
ALIGN="right"
347
VALIGN="top"
348
><SPAN
349
CLASS="PROPERTY"
350
>requires</SPAN
351
></TD
352
></TR
353
></TABLE
354
></DIV
355
></BODY
356
></HTML
357
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.