Next: Configuration Scripts
Up: Configuration File Syntax
Previous: Conditional Statements
Contents
configuration.ccl
[NOTE: The configuration.ccl is still relatively new, and not
all features listed below may be fully implemented or functional.]
A configuration.ccl file defines capabilities which a thorn
either provides or requires, or may use if available. Unlike implementations, only one thorn providing a particular capability may
be compiled into a configuration at one time. Thus this mechanism may
be used to, for example: provide access to external libraries; provide
access to functions which other thorns must call, but are too complex
for function aliasing; or to split a thorn into several thorns, all of
which require some common (not aliased) functions.
A configuration options file can contain any number of the following
sections:
PROVIDES <Capability>
{
SCRIPT <Configuration script>
LANG <Language>
[OPTIONS [<option>[,<option>]...]]
}
Informs the CST that this thorn provides a given capability, and that
this capability has a given detection script which may be used to
configure it (e.g. running an autoconf script or detecting an external
library's location). The script should output configuration
information on its standard output -- the syntax is described below
in Section E2.5.1. The
script may also indicate the failure to detect a capability by
returning a non-zero exit code; this will stop the build after the
CST stage.
Scripts can be in any language. If an interpreter is needed to run
the script, for example Perl , this should be indicated by the
LANG option.
The specified options are checked for in the original configuration
and any options passed on the command line (including an `options'
file) at compile time when the thorn is added, or if the CST is
rerun. These options need be set only once, and will be remembered
between builds.
REQUIRES <Capability>
Informs the CST that this thorn requires a certain capability to be
present. If no thorn providing the capability is in the ThornList,
the build will stop after the CST stage.
OPTIONAL <Capability>
{
DEFINE <macro>
}
Informs the CST that this thorn may use a certain capability if a
thorn providing it is in the ThornList. If present, the preprocessor
macro macro will be defined and given the value ``1''.
Subsections
Next: Configuration Scripts
Up: Configuration File Syntax
Previous: Conditional Statements
Contents
|