<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>define_header</TITLE
|
>define_header</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="The eCos Component Writer's Guide"
|
TITLE="The eCos Component Writer's Guide"
|
HREF="cdl-guide.html"><LINK
|
HREF="cdl-guide.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="CDL Language Specification"
|
TITLE="CDL Language Specification"
|
HREF="reference.html"><LINK
|
HREF="reference.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="define_format"
|
TITLE="define_format"
|
HREF="ref.define-format.html"><LINK
|
HREF="ref.define-format.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="define_proc"
|
TITLE="define_proc"
|
HREF="ref.define-proc.html"></HEAD
|
HREF="ref.define-proc.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="REFENTRY"
|
CLASS="REFENTRY"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>The <SPAN
|
>The <SPAN
|
CLASS="APPLICATION"
|
CLASS="APPLICATION"
|
>eCos</SPAN
|
>eCos</SPAN
|
> Component Writer's Guide</TH
|
> Component Writer's Guide</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="ref.define-format.html"
|
HREF="ref.define-format.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="ref.define-proc.html"
|
HREF="ref.define-proc.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><H1
|
><H1
|
><A
|
><A
|
NAME="REF.DEFINE-HEADER"><SPAN
|
NAME="REF.DEFINE-HEADER"><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_header</SPAN
|
>define_header</SPAN
|
></H1
|
></H1
|
><DIV
|
><DIV
|
CLASS="REFNAMEDIV"
|
CLASS="REFNAMEDIV"
|
><A
|
><A
|
NAME="AEN4123"
|
NAME="AEN4123"
|
></A
|
></A
|
><H2
|
><H2
|
>Name</H2
|
>Name</H2
|
>Property <SPAN
|
>Property <SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_header</SPAN
|
>define_header</SPAN
|
> -- Specify the configuration header file that
|
> -- Specify the configuration header file that
|
will be generated for a given package.</DIV
|
will be generated for a given package.</DIV
|
><DIV
|
><DIV
|
CLASS="REFSYNOPSISDIV"
|
CLASS="REFSYNOPSISDIV"
|
><A
|
><A
|
NAME="AEN4127"><H2
|
NAME="AEN4127"><H2
|
>Synopsis</H2
|
>Synopsis</H2
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SYNOPSIS"
|
CLASS="SYNOPSIS"
|
>cdl_package <name> {
|
>cdl_package <name> {
|
define_header <file name>
|
define_header <file name>
|
…
|
…
|
}</PRE
|
}</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="AEN4129"
|
NAME="AEN4129"
|
></A
|
></A
|
><H2
|
><H2
|
>Description</H2
|
>Description</H2
|
><P
|
><P
|
>When the configuration tools generate a build tree, one of the steps
|
>When the configuration tools generate a build tree, one of the steps
|
is to output each package's configuration data to a header file. For
|
is to output each package's configuration data to a header file. For
|
example the kernel's configuration data gets output to
|
example the kernel's configuration data gets output to
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>pkgconf/kernel.h</TT
|
>pkgconf/kernel.h</TT
|
>. This allows
|
>. This allows
|
each package's source code to <TT
|
each package's source code to <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>#include</TT
|
>#include</TT
|
> the
|
> the
|
appropriate header file and adapt to the choices made by the user.</P
|
appropriate header file and adapt to the choices made by the user.</P
|
><P
|
><P
|
>By default the configuration tools will synthesize a file name from
|
>By default the configuration tools will synthesize a file name from
|
the package name. This involves removing any prefix such as
|
the package name. This involves removing any prefix such as
|
<TT
|
<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>CYGPKG_</TT
|
>CYGPKG_</TT
|
>, up to and including the first underscore,
|
>, up to and including the first underscore,
|
and then converting the remainder of the name to lower case. In some
|
and then converting the remainder of the name to lower case. In some
|
cases it may be desirable to use a different header file, for example
|
cases it may be desirable to use a different header file, for example
|
an existing package may have been ported to <SPAN
|
an existing package may have been ported to <SPAN
|
CLASS="APPLICATION"
|
CLASS="APPLICATION"
|
>eCos</SPAN
|
>eCos</SPAN
|
> and the source code
|
> and the source code
|
may already <TT
|
may already <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>#include</TT
|
>#include</TT
|
> a particular file for
|
> a particular file for
|
configuration data. In such cases a <SPAN
|
configuration data. In such cases a <SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_header</SPAN
|
>define_header</SPAN
|
> property can be
|
> property can be
|
used to specify an alternative filename.</P
|
used to specify an alternative filename.</P
|
><P
|
><P
|
>The <SPAN
|
>The <SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_header</SPAN
|
>define_header</SPAN
|
> property can only be used in the body of a
|
> property can only be used in the body of a
|
<TT
|
<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>cdl_package</TT
|
>cdl_package</TT
|
> command. It applies to a package as a whole and cannot
|
> command. It applies to a package as a whole and cannot
|
be used at a finer grain. The name specified in a <SPAN
|
be used at a finer grain. The name specified in a <SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_header</SPAN
|
>define_header</SPAN
|
>
|
>
|
property will always be interpreted as relative to the
|
property will always be interpreted as relative to the
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>include/pkgconf</TT
|
>include/pkgconf</TT
|
> sub-directory
|
> sub-directory
|
of the install tree.</P
|
of the install tree.</P
|
><DIV
|
><DIV
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><BLOCKQUOTE
|
><BLOCKQUOTE
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><P
|
><P
|
><B
|
><B
|
>Note: </B
|
>Note: </B
|
>For hardware-specific packages such as device drivers and HAL
|
>For hardware-specific packages such as device drivers and HAL
|
packages, the current scheme of generating a configuration header file
|
packages, the current scheme of generating a configuration header file
|
name based on the package name may be abandoned. Instead all hardware
|
name based on the package name may be abandoned. Instead all hardware
|
packages would send their configuration data to a single header file,
|
packages would send their configuration data to a single header file,
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>pkgconf/hardware.h</TT
|
>pkgconf/hardware.h</TT
|
>. This would
|
>. This would
|
make it easier for code to obtain details of the current hardware, but
|
make it easier for code to obtain details of the current hardware, but
|
obviously there are compatibility issues. For now it is recommended
|
obviously there are compatibility issues. For now it is recommended
|
that all hardware packages specify their configuration header file
|
that all hardware packages specify their configuration header file
|
explicitly. </P
|
explicitly. </P
|
></BLOCKQUOTE
|
></BLOCKQUOTE
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="AEN4147"
|
NAME="AEN4147"
|
></A
|
></A
|
><H2
|
><H2
|
>Example</H2
|
>Example</H2
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>cdl_package CYGPKG_HAL_ARM {
|
>cdl_package CYGPKG_HAL_ARM {
|
display "ARM architecture"
|
display "ARM architecture"
|
parent CYGPKG_HAL
|
parent CYGPKG_HAL
|
hardware
|
hardware
|
include_dir cyg/hal
|
include_dir cyg/hal
|
define_header hal_arm.h
|
define_header hal_arm.h
|
…
|
…
|
}</PRE
|
}</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="AEN4150"
|
NAME="AEN4150"
|
></A
|
></A
|
><H2
|
><H2
|
>See Also</H2
|
>See Also</H2
|
><P
|
><P
|
>Properties <A
|
>Properties <A
|
HREF="ref.define.html"
|
HREF="ref.define.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define</SPAN
|
>define</SPAN
|
></A
|
></A
|
>,
|
>,
|
<A
|
<A
|
HREF="ref.define-format.html"
|
HREF="ref.define-format.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_format</SPAN
|
>define_format</SPAN
|
></A
|
></A
|
>,
|
>,
|
<A
|
<A
|
HREF="ref.define-proc.html"
|
HREF="ref.define-proc.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_proc</SPAN
|
>define_proc</SPAN
|
></A
|
></A
|
>,
|
>,
|
<A
|
<A
|
HREF="ref.if-define.html"
|
HREF="ref.if-define.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>if_define</SPAN
|
>if_define</SPAN
|
></A
|
></A
|
>,
|
>,
|
<A
|
<A
|
HREF="ref.no-define.html"
|
HREF="ref.no-define.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>no_define</SPAN
|
>no_define</SPAN
|
></A
|
></A
|
> and
|
> and
|
<A
|
<A
|
HREF="ref.hardware.html"
|
HREF="ref.hardware.html"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>hardware</SPAN
|
>hardware</SPAN
|
></A
|
></A
|
>,</P
|
>,</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ref.define-format.html"
|
HREF="ref.define-format.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="cdl-guide.html"
|
HREF="cdl-guide.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ref.define-proc.html"
|
HREF="ref.define-proc.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_format</SPAN
|
>define_format</SPAN
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="reference.html"
|
HREF="reference.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><SPAN
|
><SPAN
|
CLASS="PROPERTY"
|
CLASS="PROPERTY"
|
>define_proc</SPAN
|
>define_proc</SPAN
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|