Use the compile and install subcommands of meson instead of calling
ninja. This allows for the possibility of a different back end.
Stop using the NINJAOPTS variable.
Add --num-processes to "meson test" call regardless of whether MAKEOPTS
is set since the default is 1 process.
Signed-off-by: William Hubbs <
williamh@gentoo.org>
---
eclass/meson.eclass | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 2a563e367c6..a14d7412b56 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -379,7 +379,13 @@ meson_src_configure() {
meson_src_compile() {
debug-print-function ${FUNCNAME} "$@"
- eninja -C "${BUILD_DIR}" "$@"
+ local mesoncompileargs=(
+ -C "${BUILD_DIR}"
+ --jobs "$(makeopts_jobs "${MAKEOPTS}")"
+ --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)"
+ )
+
+ meson compile "${mesoncompileargs[@]}" "$@" || die "compile failed"
}
# @FUNCTION: meson_src_test
@@ -391,11 +397,8 @@ meson_src_test() {
local mesontestargs=(
-C "${BUILD_DIR}"
+ --num-processes "$(makeopts_jobs "${MAKEOPTS}" )"
)
- [[ -n ${NINJAOPTS} || -n ${MAKEOPTS} ]] &&
- mesontestargs+=(
- --num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})"
- )
# Append additional arguments from ebuild
mesontestargs+=("${