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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [cdl-guide/] [ref.define-header.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
>define_header</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="define_format"
26
HREF="ref.define-format.html"><LINK
27
REL="NEXT"
28
TITLE="define_proc"
29
HREF="ref.define-proc.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.define-format.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.define-proc.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.DEFINE-HEADER"><SPAN
86
CLASS="PROPERTY"
87
>define_header</SPAN
88
></H1
89
><DIV
90
CLASS="REFNAMEDIV"
91
><A
92
NAME="AEN4123"
93
></A
94
><H2
95
>Name</H2
96
>Property <SPAN
97
CLASS="PROPERTY"
98
>define_header</SPAN
99
>&nbsp;--&nbsp;Specify the  configuration header file that
100
will be generated for a given package.</DIV
101
><DIV
102
CLASS="REFSYNOPSISDIV"
103
><A
104
NAME="AEN4127"><H2
105
>Synopsis</H2
106
><TABLE
107
BORDER="5"
108
BGCOLOR="#E0E0F0"
109
WIDTH="70%"
110
><TR
111
><TD
112
><PRE
113
CLASS="SYNOPSIS"
114
>cdl_package &lt;name&gt; {
115
    define_header &lt;file name&gt;
116
    &#8230;
117
}</PRE
118
></TD
119
></TR
120
></TABLE
121
></DIV
122
><DIV
123
CLASS="REFSECT1"
124
><A
125
NAME="AEN4129"
126
></A
127
><H2
128
>Description</H2
129
><P
130
>When the configuration tools generate a build tree, one of the steps
131
is to output each package's configuration data to a header file. For
132
example the kernel's configuration data gets output to
133
<TT
134
CLASS="FILENAME"
135
>pkgconf/kernel.h</TT
136
>. This allows
137
each package's source code to <TT
138
CLASS="LITERAL"
139
>#include</TT
140
> the
141
appropriate header file and adapt to the choices made by the user.</P
142
><P
143
>By default the configuration tools will synthesize a file name from
144
the package name. This involves removing any prefix such as
145
<TT
146
CLASS="LITERAL"
147
>CYGPKG_</TT
148
>, up to and including the first underscore,
149
and then converting the remainder of the name to lower case. In some
150
cases it may be desirable to use a different header file, for example
151
an existing package may have been ported to <SPAN
152
CLASS="APPLICATION"
153
>eCos</SPAN
154
> and the source code
155
may already <TT
156
CLASS="LITERAL"
157
>#include</TT
158
> a particular file for
159
configuration data. In such cases a <SPAN
160
CLASS="PROPERTY"
161
>define_header</SPAN
162
> property can be
163
used to specify an alternative filename.</P
164
><P
165
>The <SPAN
166
CLASS="PROPERTY"
167
>define_header</SPAN
168
> property can only be used in the body of a
169
<TT
170
CLASS="LITERAL"
171
>cdl_package</TT
172
> command. It applies to a package as a whole and cannot
173
be used at a finer grain. The name specified in a <SPAN
174
CLASS="PROPERTY"
175
>define_header</SPAN
176
>
177
property will always be interpreted as relative to the
178
<TT
179
CLASS="FILENAME"
180
>include/pkgconf</TT
181
> sub-directory
182
of the install tree.</P
183
><DIV
184
CLASS="NOTE"
185
><BLOCKQUOTE
186
CLASS="NOTE"
187
><P
188
><B
189
>Note: </B
190
>For hardware-specific packages such as device drivers and HAL
191
packages, the current scheme of generating a configuration header file
192
name based on the package name may be abandoned. Instead all hardware
193
packages would send their configuration data to a single header file,
194
<TT
195
CLASS="FILENAME"
196
>pkgconf/hardware.h</TT
197
>. This would
198
make it easier for code to obtain details of the current hardware, but
199
obviously there are compatibility issues. For now it is recommended
200
that all hardware packages specify their configuration header file
201
explicitly. </P
202
></BLOCKQUOTE
203
></DIV
204
></DIV
205
><DIV
206
CLASS="REFSECT1"
207
><A
208
NAME="AEN4147"
209
></A
210
><H2
211
>Example</H2
212
><TABLE
213
BORDER="5"
214
BGCOLOR="#E0E0F0"
215
WIDTH="70%"
216
><TR
217
><TD
218
><PRE
219
CLASS="PROGRAMLISTING"
220
>cdl_package CYGPKG_HAL_ARM {
221
    display       "ARM architecture"
222
    parent        CYGPKG_HAL
223
    hardware
224
    include_dir   cyg/hal
225
    define_header hal_arm.h
226
    &#8230;
227
}</PRE
228
></TD
229
></TR
230
></TABLE
231
></DIV
232
><DIV
233
CLASS="REFSECT1"
234
><A
235
NAME="AEN4150"
236
></A
237
><H2
238
>See Also</H2
239
><P
240
>Properties <A
241
HREF="ref.define.html"
242
><SPAN
243
CLASS="PROPERTY"
244
>define</SPAN
245
></A
246
>,
247
<A
248
HREF="ref.define-format.html"
249
><SPAN
250
CLASS="PROPERTY"
251
>define_format</SPAN
252
></A
253
>,
254
<A
255
HREF="ref.define-proc.html"
256
><SPAN
257
CLASS="PROPERTY"
258
>define_proc</SPAN
259
></A
260
>,
261
<A
262
HREF="ref.if-define.html"
263
><SPAN
264
CLASS="PROPERTY"
265
>if_define</SPAN
266
></A
267
>,
268
<A
269
HREF="ref.no-define.html"
270
><SPAN
271
CLASS="PROPERTY"
272
>no_define</SPAN
273
></A
274
> and
275
<A
276
HREF="ref.hardware.html"
277
><SPAN
278
CLASS="PROPERTY"
279
>hardware</SPAN
280
></A
281
>,</P
282
></DIV
283
><DIV
284
CLASS="NAVFOOTER"
285
><HR
286
ALIGN="LEFT"
287
WIDTH="100%"><TABLE
288
SUMMARY="Footer navigation table"
289
WIDTH="100%"
290
BORDER="0"
291
CELLPADDING="0"
292
CELLSPACING="0"
293
><TR
294
><TD
295
WIDTH="33%"
296
ALIGN="left"
297
VALIGN="top"
298
><A
299
HREF="ref.define-format.html"
300
ACCESSKEY="P"
301
>Prev</A
302
></TD
303
><TD
304
WIDTH="34%"
305
ALIGN="center"
306
VALIGN="top"
307
><A
308
HREF="cdl-guide.html"
309
ACCESSKEY="H"
310
>Home</A
311
></TD
312
><TD
313
WIDTH="33%"
314
ALIGN="right"
315
VALIGN="top"
316
><A
317
HREF="ref.define-proc.html"
318
ACCESSKEY="N"
319
>Next</A
320
></TD
321
></TR
322
><TR
323
><TD
324
WIDTH="33%"
325
ALIGN="left"
326
VALIGN="top"
327
><SPAN
328
CLASS="PROPERTY"
329
>define_format</SPAN
330
></TD
331
><TD
332
WIDTH="34%"
333
ALIGN="center"
334
VALIGN="top"
335
><A
336
HREF="reference.html"
337
ACCESSKEY="U"
338
>Up</A
339
></TD
340
><TD
341
WIDTH="33%"
342
ALIGN="right"
343
VALIGN="top"
344
><SPAN
345
CLASS="PROPERTY"
346
>define_proc</SPAN
347
></TD
348
></TR
349
></TABLE
350
></DIV
351
></BODY
352
></HTML
353
>

powered by: WebSVN 2.1.0

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