mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
eclass/meson: Sync with Gentoo
It's from Gentoo commit dbeb507f468dcc75095d54b59c165dcc70ef558d.
This commit is contained in:
parent
e514342a46
commit
e8583e4a2d
@ -425,7 +425,7 @@ meson_src_configure() {
|
||||
export -n {C,CPP,CXX,F,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH}
|
||||
echo meson setup "${MESONARGS[@]}" >&2
|
||||
meson setup "${MESONARGS[@]}"
|
||||
) || die
|
||||
) || die -n
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_src_compile
|
||||
@ -435,8 +435,9 @@ meson_src_configure() {
|
||||
meson_src_compile() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
local mesoncompileargs=(
|
||||
-C "${BUILD_DIR}"
|
||||
--jobs "$(get_makeopts_jobs 0)"
|
||||
--load-average "$(get_makeopts_loadavg 0)"
|
||||
)
|
||||
@ -450,7 +451,9 @@ meson_src_compile() {
|
||||
|
||||
set -- meson compile "${mesoncompileargs[@]}"
|
||||
echo "$@" >&2
|
||||
"$@" || die "compile failed"
|
||||
"$@" || die -n "compile failed"
|
||||
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_src_test
|
||||
@ -460,16 +463,19 @@ meson_src_compile() {
|
||||
meson_src_test() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
local mesontestargs=(
|
||||
--print-errorlogs
|
||||
-C "${BUILD_DIR}"
|
||||
--num-processes "$(makeopts_jobs "${MAKEOPTS}")"
|
||||
"$@"
|
||||
)
|
||||
|
||||
set -- meson test "${mesontestargs[@]}"
|
||||
echo "$@" >&2
|
||||
"$@" || die "tests failed"
|
||||
"$@" || die -n "tests failed"
|
||||
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_install
|
||||
@ -479,8 +485,9 @@ meson_src_test() {
|
||||
meson_install() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
|
||||
local mesoninstallargs=(
|
||||
-C "${BUILD_DIR}"
|
||||
--destdir "${D}"
|
||||
--no-rebuild
|
||||
"$@"
|
||||
@ -488,7 +495,9 @@ meson_install() {
|
||||
|
||||
set -- meson install "${mesoninstallargs[@]}"
|
||||
echo "$@" >&2
|
||||
"$@" || die "install failed"
|
||||
"$@" || die -n "install failed"
|
||||
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_src_install
|
||||
|
Loading…
Reference in New Issue
Block a user