MULTIBUILD.ECLASS
Section: eclass-manpages (5)Updated: Nov 2024
Index Return to Main Contents
NAME
multibuild.eclass - A generic eclass for building multiple variants of packages.DESCRIPTION
The multibuild eclass aims to provide a generic framework for building multiple 'variants' of a package (e.g. multilib, Python implementations).SUPPORTED EAPIS
7 8FUNCTIONS
- multibuild_foreach_variant [<argv>...]
-
Run the passed command repeatedly for each of the enabled package
variants.
Each of the runs will have variant-specific BUILD_DIR set, and output teed to a separate log in ${T}.
The function returns 0 if all commands return 0, or the first non-zero exit status otherwise. However, it performs all the invocations nevertheless. It is preferred to call 'die' inside of the passed function.
- multibuild_for_best_variant [<argv>...]
-
Run the passed command once, for the best of the enabled package
variants.
The run will have a proper, variant-specificBUILD_DIR set, and output teed to a separate log in ${T}.
The function returns command exit status.
- multibuild_copy_sources
- Create per-variant copies of source tree. The source tree is assumed to be in ${BUILD_DIR}, or ${S} if the former is unset. The copies will be placed in directories matching BUILD_DIRs used by multibuild_foreach().
- multibuild_merge_root <src-root> <dest-root>
- Merge the directory tree (fake root) from <src-root> to <dest-root> (the real root). Both directories have to be real, absolute paths (i.e. including ${D}). Source root will be removed.
ECLASS VARIABLES
- MULTIBUILD_VARIANTS (REQUIRED)
-
An array specifying all enabled variants which multibuild_foreach*
can execute the process for.
In ebuild, it can be set in global scope. Eclasses should set it locally in function scope to support nesting properly.
Example:
python_foreach_impl() { local MULTIBUILD_VARIANTS=( python{2_5,2_6,2_7} ... ) multibuild_foreach_variant python_compile }
- MULTIBUILD_VARIANT (GENERATED BY ECLASS)
-
The current variant which the function was executed for.
Example value:
python2_6
- MULTIBUILD_ID (GENERATED BY ECLASS)
-
The unique identifier for a multibuild run. In a simple run, it is
equal to MULTIBUILD_VARIANT. In a nested multibuild environment, it
contains the complete selection tree.
It can be used to create variant-unique directories and files.
Example value:
amd64-double
- BUILD_DIR (GENERATED BY ECLASS)
-
The current build directory. In global scope, it is supposed
to contain an 'initial' build directory. If unset, ${S} is used.
multibuild_foreach_variant() sets BUILD_DIR locally to variant-specific build directories based on the initial value of BUILD_DIR.
Example value:
${WORKDIR}/foo-1.3-python2_6
AUTHORS
Author: Michał Górny <[email protected]>MAINTAINERS
Michał Górny <[email protected]>REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
multibuild.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/multibuild.eclass
Index
- NAME
- DESCRIPTION
- SUPPORTED EAPIS
- FUNCTIONS
- ECLASS VARIABLES
- AUTHORS
- MAINTAINERS
- REPORTING BUGS
- FILES
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, November 25, 2024