NAME | SYNOPSIS | DESCRIPTION | OPTIONS | FILES | ATTRIBUTES | SEE ALSO
configure is a host utility.
The configure utility is a program used to prepare a build directory for ChorusOS by selecting a number of components either in source or in binary code.
configure prepares a directory where the different ChorusOS components will be built. The build actions may differ from one component to the other, typical build actions are compilation, build of a ChorusOS archive, configuration, build of a NFS root directory for ChorusOS targets.
The following options are supported:
This option is only used for source components to be built with the mkmerge, such as the ChorusOS nucleus.
The profile-file... arguments are names for the profile files given as argument to mkmerge.
The source-dir... arguments are the pathnames of the different source components.
The bin-dir... arguments are the pathnames of the different binary components.
This option allows to add definitions of variables in the Paths configuration file.
This option allows to select a build directory. The default value is the current directory.
The component directories given as arguments to configure through the -s and -b options are read-only. All build files related to those components are created in the build directory.
Each component given as argument to configure must contain component Makefiles:
Makefile.bin for binary components given through the -b option
Makefile.src and Makefile.bin for source components given through the -s option
These component Makefiles contains all actions to be done to use the component in the ChorusOS environment.
configure creates two files in the build directory:
Makefile
Paths
Makefile is the main makefile, it includes all Makefile.src from all source components and all Makefile.bin of all configured components, thus allowing to perfom the actions of each of those components.
The Paths file defines variables referencing the pathnames of all configured components. If the -d option is used in the configure command, it allows for example to set the cross compiler installation directory with the CDS_DIR variable.
There may be two variables defined per component, for example for a component named COMP:
The source directory for COMP components
The directory where COMP binaries are located
COMP is used by the COMP build rules in order to generate COMP from its source code (Makefile.src).
COMP_DIR may be used by other components that depend on COMP. Only COMP_DIR is relevant if COMP is provided as a binary component.
A concrete example is the generation of a board support package (BSP) for ChorusOS depends on the NUCLEUS_DIR directory containing the binary delivery providing the support for this target board. NUCLEUS_DIR is used in the Makefile.src and Makefile.bin makefiles of the BSP.
Makefile.src in the COMP component defines how to build the binary component from the source component.
The target COMP.all contains the build actions.
If the component depends on another component, COMP1 for example, it is necessary to express in the Makefile.src that COMP.all depends on COMP1.all so that build actions are done in the right order , that is COMP1 builds before COMP.
One component cannot depend on the fact that the component it depends on, is in binary or in source form.
The build of the component COMP is done in the directory build-COMP.
In the examples, provided with ChorusOS, the source code is not copied into the build-COMP directory but accessed through the VPATH mechanism.
The target COMP.dist allows to prepare a binary distribution of the component COMP. The convention is that this binary distribution is done in the directory dist-COMP of the build directory. Files to be included in the binary delivery are generally copied from the directory build-COMP into the directory dist-COMP. In particular, the binary distribution must at least contain a Makefile.bin file for the binary component.
Makefile.src files should be written in such a way that if the directory build-COMP is removed, make regenerates it.
Makefile.bin in the COMP component defines at least its name. If COMP allows some actions, those actions are present in Makefile.bin. Such typical actions are:
ChorusOS archives generation
Component configuration
Creation of a root file system to be mounted on the target
All Makefile.bin must be written so that they can be concatenated and allow the installation of the different binary components in the same installation directory.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | FILES | ATTRIBUTES | SEE ALSO