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.cdl-component.html"><LINK
29 HREF="ref.cdl-interface.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
60 HREF="ref.cdl-component.html"
74 HREF="ref.cdl-interface.html"
85 NAME="REF.CDL-PACKAGE"><TT
99 > -- Define a package, a component that can be distributed</DIV
101 CLASS="REFSYNOPSISDIV"
113 >cdl_package <name> {
128 >A package is a unit of distribution. It is also a configuration option
129 in that users can choose whether or not a particular package is loaded
130 into the configuration, and which version of that package should be
131 loaded. It is also a component in that it can contain additional
132 components and options in a hierarchy.</P
137 > script for a package should begin with a <TT
141 command. This can contain most of the properties that can be used in a
145 > command, and a number of additional ones which apply to a
146 package as a whole. It is also possible to include <TT
156 > commands in the body of a package.
157 However all configuration entities that occur at the top level of the
158 script containing the <TT
161 > command are automatically placed
162 below that package in the configuration hierarchy, so putting them
163 inside the body has no effect.</P
165 >The following properties cannot be used in the body of a <TT
182 >Packages always have the flavor <TT
194 >The value of a package is its version number. This is specified at the
195 time the package is loaded into the configuration, and cannot be
196 calculated afterwards. Typically the most recent version of the
197 package will be loaded.</P
206 >The legal values list for a given package is determined by which
207 versions of that package are installed in the component repository,
208 and cannot be further constrained in the CDL scripts.</P
217 >The value of a package is always selected at the time that it is
218 loaded into the configuration, and cannot be re-calculated afterwards.</P
227 >This would be redundant since the CDL script containing the
231 > command acts as that package's script.</P
239 > is implemented as a Tcl command that takes two
240 arguments, a name and a body. The name must be a valid C preprocessor
241 identifier: a sequence of upper or lower case letters, digits or
242 underscores, starting with a non-digit character; identifiers
243 beginning with an underscore should normally be avoided because they
244 may clash with system packages or with identifiers reserved for use by
245 the compiler. Packages should always have unique names within a given
246 component repository. For a recommended naming convention see <A
247 HREF="package.contents.html"
248 >the Section called <I
249 >Package Contents and Layout</I
253 >The second argument to <TT
256 > is a body of properties and other
257 commands, typically surrounded by braces so that the Tcl interpreter
258 treats it as a single argument. This body will be processed by a
259 recursive invocation of the Tcl interpreter, extended with additional
260 commands for the various properties that are allowed inside a
264 >. The valid commands are:</P
272 HREF="ref.active-if.html"
280 >Allow additional control over the active state of this package.</P
284 HREF="ref.cdl-component.html"
292 >Define a component which should appear immediately below this package
293 in the configuration hierarchy.</P
297 HREF="ref.cdl-interface.html"
305 >Define an interface which should appear immediately below this
306 package in the configuration hierarchy.</P
310 HREF="ref.cdl-option.html"
318 >Define an option which should appear immediately below
319 this package in the configuration hierarchy.</P
323 HREF="ref.compile.html"
331 >List the source files that should be built for this package.</P
335 HREF="ref.define.html"
343 >Specify additional <TT
346 > symbols that should go
347 into the package's configuration header file.</P
351 HREF="ref.define-format.html"
359 >Control how the package's value will appear in the global
360 configuration header file <TT
362 >pkgconf/system.h</TT
367 HREF="ref.define-header.html"
375 >Specify the configuration header file that will be generated for this package.</P
379 HREF="ref.define-proc.html"
387 >Use a fragment of Tcl code to output additional data to
388 configuration header files.</P
392 HREF="ref.description.html"
400 >Provide a textual description for this component.</P
404 HREF="ref.display.html"
412 >Provide a short string describing this component.</P
424 >The location of on-line documentation for this component.</P
428 HREF="ref.hardware.html"
436 >This package is tied to specific hardware.</P
440 HREF="ref.if-define.html"
448 >Output a common preprocessor construct to a configuration header file. </P
452 HREF="ref.implements.html"
460 >Enabling this component provides one instance of a more general
465 HREF="ref.include-dir.html"
473 >Specify the desired location of this package's exported header files in
478 HREF="ref.include-files.html"
486 >List the header files that are exported by this package.</P
490 HREF="ref.library.html"
498 >Specify which library should contain the object files
499 generated by building this package.</P
511 >An additional custom build step associated with this component, resulting
512 in a target that should not go directly into a library.</P
516 HREF="ref.make-object.html"
524 >An additional custom build step associated with this component, resulting
525 in an object file that should go into a library.</P
529 HREF="ref.no-define.html"
537 >Suppress the normal generation of the package's
541 > in the global configuration header file
544 >pkgconf/system.h</TT
549 HREF="ref.parent.html"
557 >Control the location of this package in the configuration hierarchy. </P
561 HREF="ref.requires.html"
569 >List constraints that the configuration should satisfy if this package is
589 CLASS="PROGRAMLISTING"
590 >cdl_package CYGPKG_INFRA {
591 display "Infrastructure"
592 include_dir cyg/infra
594 Common types and useful macros.
595 Tracing and assertion facilities.
596 Package startup options."
598 compile startup.cxx prestart.cxx pkgstart.cxx userstart.cxx \
599 dummyxxmain.cxx null.cxx simple.cxx fancy.cxx buffer.cxx \
600 diag.cxx tcdiag.cxx memcpy.c memset.c delete.cxx
615 HREF="ref.cdl-option.html"
622 HREF="ref.cdl-component.html"
629 HREF="ref.cdl-interface.html"
641 SUMMARY="Footer navigation table"
652 HREF="ref.cdl-component.html"
661 HREF="cdl-guide.html"
670 HREF="ref.cdl-interface.html"
689 HREF="reference.html"