When building a recipe using the
devtool build
command, the typical build
progresses as follows:
Fetch the source
Unpack the source
Configure the source
Compile the source
Install the build output
Package the installed output
For recipes in the workspace, fetching and unpacking is disabled
as the source tree has already been prepared and is persistent.
Each of these build steps is defined as a function (task), usually
with a "do_" prefix (e.g.
do_fetch
,
do_unpack
,
and so forth).
These functions are typically shell scripts but can instead be
written in Python.
If you look at the contents of a recipe, you will see that the
recipe does not include complete instructions for building the
software.
Instead, common functionality is encapsulated in classes inherited
with the inherit
directive.
This technique leaves the recipe to describe just the things that
are specific to the software being built.
A
base
class exists that is implicitly inherited by all recipes and
provides the functionality that most recipes typically need.
The remainder of this section presents information useful when working with recipes.