2.6. Working With Recipes

When building a recipe with devtool build the typical build progression is as follows:

  1. Fetch the source

  2. Unpack the source

  3. Configure the source

  4. Compiling the source

  5. Install the build output

  6. 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, usually with a "do_" prefix. 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, leaving the recipe to describe just the things that are specific to the software to be built. A base class exists that is implicitly inherited by all recipes and provides the functionality that most typical recipes need.

The remainder of this section presents information useful when working with recipes.