mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
eclass/ninja-utils: Sync with Gentoo
It's from Gentoo commit 385957565ea319259586571fb931e2df01bdf215.
This commit is contained in:
parent
42d4c79083
commit
68488e7c2d
@ -3,8 +3,7 @@
|
||||
|
||||
# @ECLASS: ninja-utils.eclass
|
||||
# @MAINTAINER:
|
||||
# Michał Górny <mgorny@gentoo.org>
|
||||
# Mike Gilbert <floppym@gentoo.org>
|
||||
# base-system@gentoo.org
|
||||
# @AUTHOR:
|
||||
# Michał Górny <mgorny@gentoo.org>
|
||||
# Mike Gilbert <floppym@gentoo.org>
|
||||
@ -48,6 +47,12 @@ _NINJA_UTILS_ECLASS=1
|
||||
# supposed to be set in make.conf. If unset, eninja() will convert
|
||||
# MAKEOPTS instead.
|
||||
|
||||
# @ECLASS_VARIABLE: NINJA_VERBOSE
|
||||
# @USER_VARIABLE
|
||||
# @DESCRIPTION:
|
||||
# Set to OFF to disable verbose messages during compilation
|
||||
: "${NINJA_VERBOSE:=ON}"
|
||||
|
||||
inherit multiprocessing
|
||||
|
||||
case "${NINJA}" in
|
||||
@ -80,7 +85,12 @@ get_NINJAOPTS() {
|
||||
# also supports being called via 'nonfatal'.
|
||||
eninja() {
|
||||
[[ -n "${NINJA_DEPEND}" ]] || ewarn "Unknown value '${NINJA}' for \${NINJA}"
|
||||
set -- "${NINJA}" -v $(get_NINJAOPTS) "$@"
|
||||
local v
|
||||
case "${NINJA_VERBOSE}" in
|
||||
OFF) ;;
|
||||
*) v="-v"
|
||||
esac
|
||||
set -- "${NINJA}" ${v} $(get_NINJAOPTS) "$@"
|
||||
echo "$@" >&2
|
||||
"$@" || die -n "${*} failed"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user