Re: [PATCH] perf build: Do not print PERF_VERSION with make -s

From: Arnaldo Carvalho de Melo

Date: Tue Dec 01 2026 - 13:38:10 EST


On Tue, Dec 01, 2026 at 01:08:49PM -0500, Sasha Levin wrote:
> PERF-VERSION-GEN prints the version whenever it changes, which is after
> every commit when building from git:
>
> $ make -s -C tools/perf
> PERF_VERSION = 7.4.rc5.g253f86660c1f
>
> Leave the line out when make runs with -s, which
> tools/scripts/Makefile.include exports as quiet=silent_.

Acked-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

- Arnaldo

> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
> tools/perf/util/PERF-VERSION-GEN | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
> index d7dc7c28508c0..3ed30e85ba94f 100755
> --- a/tools/perf/util/PERF-VERSION-GEN
> +++ b/tools/perf/util/PERF-VERSION-GEN
> @@ -45,7 +45,7 @@ else
> VC=unset
> fi
> test "$VN" = "$VC" || {
> - echo >&2 " PERF_VERSION = $VN"
> + test "$quiet" = silent_ || echo >&2 " PERF_VERSION = $VN"
> echo "#define PERF_VERSION \"$VN\"" >$GVF
> }
>
> --
> 2.53.0