Re: [PATCH v2 1/2] tools: Unify top-level quiet infrastructure
From: Jiri Olsa
Date: Tue Feb 11 2025 - 08:38:24 EST
On Mon, Feb 10, 2025 at 10:34:42AM -0800, Charlie Jenkins wrote:
SNIP
> +# Beautify output
> +# ---------------------------------------------------------------------------
> +#
> +# Most of build commands in Kbuild start with "cmd_". You can optionally define
> +# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
> +# that command is printed by default.
> +#
> +# e.g.)
> +# quiet_cmd_depmod = DEPMOD $(MODLIB)
> +# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
> +#
> +# A simple variant is to prefix commands with $(Q) - that's useful
> +# for commands that shall be hidden in non-verbose mode.
> +#
> +# $(Q)$(MAKE) $(build)=scripts/basic
> +#
> +# To put more focus on warnings, be less verbose as default
> +# Use 'make V=1' to see the full commands
> +
> +ifeq ($(V),1)
> + quiet =
> + Q =
> +else
> + quiet = quiet_
> + Q = @
> +endif
> +
> # If the user is running make -s (silent mode), suppress echoing of commands
> # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> @@ -145,9 +172,11 @@ short-opts := $(filter-out --%,$(MAKEFLAGS))
> endif
>
> ifneq ($(findstring s,$(short-opts)),)
> - silent=1
hi,
I think you need to keep this one, there's "ifneq ($(silent),1)" condition
later in the file for the silent (-s) builds
jirka
> + quiet=silent_
> endif
>
> +export quiet Q
> +
> #
> # Define a callable command for descending to a new directory
> #
>
> --
> 2.43.0
>