diff options
author | Jonas Rakebrandt <xarblu@protonmail.com> | 2023-01-02 20:40:13 +0100 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-07-18 16:51:54 -0400 |
commit | 89fa08dd8703bfd854d6a77a60bbd270ae8d803d (patch) | |
tree | 3e26e2bc1f9b74a605153b88c1b6d03169c052f1 /eclass | |
parent | meson.eclass: Change maintainer to base-system@ (diff) | |
download | gentoo-89fa08dd8703bfd854d6a77a60bbd270ae8d803d.tar.gz gentoo-89fa08dd8703bfd854d6a77a60bbd270ae8d803d.tar.bz2 gentoo-89fa08dd8703bfd854d6a77a60bbd270ae8d803d.zip |
meson.eclass: Add MESON_VERBOSE
This works similar to cmake.eclass's ${CMAKE_VERBOSE}.
Closes: https://github.com/gentoo/gentoo/pull/28942
Signed-off-by: Jonas Rakebrandt <xarblu@protonmail.com>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/meson.eclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass index adbc495fdef3..5aff3eb58930 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -54,6 +54,12 @@ BDEPEND=">=dev-util/meson-0.62.2 # Build directory, location where all generated files should be placed. # If this isn't set, it defaults to ${WORKDIR}/${P}-build. +# @ECLASS_VARIABLE: MESON_VERBOSE +# @USER_VARIABLE +# @DESCRIPTION: +# Set to OFF to disable verbose messages during compilation +: "${MESON_VERBOSE:=ON}" + # @ECLASS_VARIABLE: EMESON_BUILDTYPE # @DESCRIPTION: # The buildtype value to pass to meson setup. @@ -384,10 +390,15 @@ meson_src_compile() { -C "${BUILD_DIR}" --jobs "$(makeopts_jobs "${MAKEOPTS}" 0)" --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)" - --verbose - "$@" ) + case ${MESON_VERBOSE} in + OFF) ;; + *) mesoncompileargs+=( --verbose ) ;; + esac + + mesoncompileargs+=( "$@" ) + set -- meson compile "${mesoncompileargs[@]}" echo "$@" >&2 "$@" || die "compile failed" |