diff options
author | Matt Turner <mattst88@gentoo.org> | 2023-07-17 11:11:25 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-07-18 16:51:54 -0400 |
commit | 385957565ea319259586571fb931e2df01bdf215 (patch) | |
tree | 0314eec6a754bbf028ae4790daf84bd630bea70c /eclass/ninja-utils.eclass | |
parent | ninja-utils.eclass: Change maintainer to base-system@ (diff) | |
download | gentoo-385957565ea319259586571fb931e2df01bdf215.tar.gz gentoo-385957565ea319259586571fb931e2df01bdf215.tar.bz2 gentoo-385957565ea319259586571fb931e2df01bdf215.zip |
ninja-utils.eclass: Add NINJA_VERBOSE
ninja operates in one of three modes:
- verbose (with -v): prints build commands
- quiet (with --quiet): prints nothing
- normal: prints [XX/YY]-style build status updates
samurai works the same way, except it does not have a quiet mode.
Thus we can't simply override ninja-utils' hard-coded flag from callers
of eninja.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'eclass/ninja-utils.eclass')
-rw-r--r-- | eclass/ninja-utils.eclass | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index fa1aa137ea73..5a211e81131d 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -47,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 @@ -79,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" } |