[PATCH i-g-t] meson.sh: allow making it less verbose
Kamil Konieczny
kamil.konieczny at linux.intel.com
Thu Dec 14 13:32:53 UTC 2023
Hi Mauro,
On 2023-12-11 at 12:39:10 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at 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.
Looks good, please add a sample usage as: ./meson.sh V=0
here or as comment in meson.sh (I would prefer comment in meson.sh)
With that:
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab at 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
>
More information about the igt-dev
mailing list