From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t] meson.sh: allow making it less verbose
Date: Mon, 11 Dec 2023 12:39:10 +0100 [thread overview]
Message-ID: <20231211113910.144523-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Add support for not output each build step and run ninja
with --quiet option.
This is interesting specially when executed inside some
script.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
meson.sh | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/meson.sh b/meson.sh
index e112a93cf1a2..2ea33d69139e 100755
--- a/meson.sh
+++ b/meson.sh
@@ -2,36 +2,50 @@
cat > Makefile <<EOF
+quiet_build =
+quiet_reconfigure =
+Q =
+VERBOSE =
+
+ifeq ("\$(origin V)", "command line")
+ VERBOSE = \$(V)
+endif
+
+ifneq (\$(findstring 0, \$(VERBOSE)),)
+ quiet_build = --quiet
+ Q = @
+endif
+
.PHONY: default docs
default: all
build/build.ninja:
- mkdir -p build
- meson build
+ \$(Q)mkdir -p build
+ \$(Q)meson build \$(quiet_build)
all: build/build.ninja
- ninja -C build
+ \$(Q)ninja -C build \$(quiet_build)
clean: build/build.ninja
- ninja -C build clean
+ \$(Q)ninja -C build clean \$(quiet_build)
test: build/build.ninja
- ninja -C build test
+ \$(Q)ninja -C build test \$(quiet_build)
reconfigure: build/build.ninja
- ninja -C build reconfigure
+ \$(Q)ninja -C build reconfigure
check distcheck dist distclean:
- echo "This is the meson wrapper, not automake" && false
+ @echo "This is the meson wrapper, not automake" && false
install: build/build.ninja
- ninja -C build install
+ \$(Q)ninja -C build install \$(quiet_build)
uninstall: build/build.ninja
- ninja -C build uninstall
+ \$(Q)ninja -C build uninstall \$(quiet_build)
docs:
- ninja -C build igt-gpu-tools-doc
+ \$(Q)ninja -C build igt-gpu-tools-doc \$(quiet_build)
EOF
--
2.43.0
reply other threads:[~2023-12-11 11:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231211113910.144523-1-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox