public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] meson.eclass: allow disabling verbose compilation
@ 2023-07-17 14:51 Matt Turner
  2023-07-17 14:56 ` Adrian Schollmeyer
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Matt Turner @ 2023-07-17 14:51 UTC (permalink / raw
  To: gentoo-dev; +Cc: Jonas Rakebrandt, Matt Turner

From: Jonas Rakebrandt <xarblu@protonmail.com>

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>
---
 eclass/meson.eclass | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 2c274b213191..1acdee9325b2 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -55,6 +55,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_QUIET
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Disables verbose messages during compilation if non-empty.
+
 # @ECLASS_VARIABLE: EMESON_BUILDTYPE
 # @DESCRIPTION:
 # The buildtype value to pass to meson setup.
@@ -385,10 +391,14 @@ meson_src_compile() {
 		-C "${BUILD_DIR}"
 		--jobs "$(makeopts_jobs "${MAKEOPTS}" 0)"
 		--load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)"
-		--verbose
-		"$@"
 	)
 
+	if [[ -z ${MESON_QUIET} ]]; then
+		mesoncompileargs+=( --verbose )
+	fi
+
+	mesoncompileargs+=( "$@" )
+
 	set -- meson compile "${mesoncompileargs[@]}"
 	echo "$@" >&2
 	"$@" || die "compile failed"
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-20 17:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 14:51 [gentoo-dev] [PATCH] meson.eclass: allow disabling verbose compilation Matt Turner
2023-07-17 14:56 ` Adrian Schollmeyer
2023-07-17 15:24   ` Matt Turner
2023-07-17 15:23 ` [gentoo-dev] " Matt Turner
2023-07-18 16:44 ` [gentoo-dev] [PATCH v2] " Matt Turner
2023-07-19  7:23   ` Florian Schmaus
2023-07-20 15:00     ` Matt Turner
2023-07-20 15:06       ` Florian Schmaus
2023-07-20 15:08         ` Matt Turner
2023-07-20 15:45         ` Mike Gilbert
2023-07-20 16:58           ` Ulrich Mueller
2023-07-20 17:11             ` Ionen Wolkens
2023-07-20 17:33               ` Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox