Skip to content

Commit

Permalink
doc: document conditional tool usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jkloetzke committed Aug 2, 2024
1 parent 5767a92 commit 370b01e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion doc/manual/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ Other than the above differences setup scripts are identical to
{checkout,build,package}Tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Type: List of strings
Type: List of strings or tool dictionaries

This is a list of tools that should be added to ``$PATH`` during the execution
of the respective checkout/build/package script. A tool denotes a folder in an
Expand All @@ -623,6 +623,23 @@ added to ``$LD_LIBRARY_PATH``. The order of tools in ``$PATH`` and
separate set of executables so that the order of their inclusion does not
matter.

In the simple form, a tool is only specified as simple string. This will use
the tool unconditionally::

checkoutTools: [foo, bar]

If necessary, a tool can also be used conditionally. In this case the tool
is specified as a dictionary of the mandatory ``name`` and an optional ``if``
condition::

checkoutTools:
- name: foo
if: "$CONDITION"
- bar

The conditions will be checked with the final environment of a package, that is
after all dependencies of a recipe have been traversed.

A tool that is consumed in one step is also set in the following. This means a
tool consumed through checkoutTools is also available during the build and
package steps. Likewise a tool consumed by buildTools is available in the
Expand Down

0 comments on commit 370b01e

Please sign in to comment.