Skip to content

Commit a534ed3

Browse files
committed
tools: Unify top-level quiet infrastructure
JIRA: https://issues.redhat.com/browse/RHEL-77936 upstream ======== commit 293f324 Author: Charlie Jenkins <charlie@rivosinc.com> Date: Thu Feb 13 13:06:21 2025 -0800 description =========== Commit f2868b1 ("perf tools: Expose quiet/verbose variables in Makefile.perf") moved the quiet infrastructure out of tools/build/Makefile.build and into the top-level Makefile.perf file so that the quiet infrastructure could be used throughout perf and not just in Makefile.build. Extract out the quiet infrastructure into Makefile.include so that it can be leveraged outside of perf. Fixes: f2868b1 ("perf tools: Expose quiet/verbose variables in Makefile.perf") Reviewed-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Benjamin Tissoires <bentiss@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Eduard Zingerman <eddyz87@gmail.com> Cc: Hao Luo <haoluo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Josh Poimboeuf <jpoimboe@kernel.org> Cc: KP Singh <kpsingh@kernel.org> Cc: Lukasz Luba <lukasz.luba@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: Mykola Lysenko <mykolal@fb.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Monnet <qmo@kernel.org> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Song Liu <song@kernel.org> Cc: Stanislav Fomichev <sdf@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Yonghong Song <yonghong.song@linux.dev> Cc: Zhang Rui <rui.zhang@intel.com> Link: https://lore.kernel.org/r/20250213-quiet_tools-v3-1-07de4482a581@rivosinc.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 4a242f5 commit a534ed3

File tree

3 files changed

+31
-48
lines changed

3 files changed

+31
-48
lines changed

tools/build/Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld)
1717

1818
export HOSTCC HOSTLD HOSTAR
1919

20-
ifeq ($(V),1)
21-
Q =
22-
else
23-
Q = @
24-
endif
25-
26-
export Q srctree CC LD
20+
export srctree CC LD
2721

2822
MAKEFLAGS := --no-print-directory
2923
build := -f $(srctree)/tools/build/Makefile.build dir=. obj

tools/perf/Makefile.perf

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -161,47 +161,6 @@ export VPATH
161161
SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
162162
endif
163163

164-
# Beautify output
165-
# ---------------------------------------------------------------------------
166-
#
167-
# Most of build commands in Kbuild start with "cmd_". You can optionally define
168-
# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
169-
# that command is printed by default.
170-
#
171-
# e.g.)
172-
# quiet_cmd_depmod = DEPMOD $(MODLIB)
173-
# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
174-
#
175-
# A simple variant is to prefix commands with $(Q) - that's useful
176-
# for commands that shall be hidden in non-verbose mode.
177-
#
178-
# $(Q)$(MAKE) $(build)=scripts/basic
179-
#
180-
# To put more focus on warnings, be less verbose as default
181-
# Use 'make V=1' to see the full commands
182-
183-
ifeq ($(V),1)
184-
quiet =
185-
Q =
186-
else
187-
quiet=quiet_
188-
Q=@
189-
endif
190-
191-
# If the user is running make -s (silent mode), suppress echoing of commands
192-
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
193-
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
194-
short-opts := $(firstword -$(MAKEFLAGS))
195-
else
196-
short-opts := $(filter-out --%,$(MAKEFLAGS))
197-
endif
198-
199-
ifneq ($(findstring s,$(short-opts)),)
200-
quiet=silent_
201-
endif
202-
203-
export quiet Q
204-
205164
# Do not use make's built-in rules
206165
# (this improves performance and avoids hard-to-debug behaviour);
207166
MAKEFLAGS += -r

tools/scripts/Makefile.include

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,33 @@ else
139139
NO_SUBDIR = :
140140
endif
141141

142+
# Beautify output
143+
# ---------------------------------------------------------------------------
144+
#
145+
# Most of build commands in Kbuild start with "cmd_". You can optionally define
146+
# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
147+
# that command is printed by default.
148+
#
149+
# e.g.)
150+
# quiet_cmd_depmod = DEPMOD $(MODLIB)
151+
# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
152+
#
153+
# A simple variant is to prefix commands with $(Q) - that's useful
154+
# for commands that shall be hidden in non-verbose mode.
155+
#
156+
# $(Q)$(MAKE) $(build)=scripts/basic
157+
#
158+
# To put more focus on warnings, be less verbose as default
159+
# Use 'make V=1' to see the full commands
160+
161+
ifeq ($(V),1)
162+
quiet =
163+
Q =
164+
else
165+
quiet = quiet_
166+
Q = @
167+
endif
168+
142169
# If the user is running make -s (silent mode), suppress echoing of commands
143170
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
144171
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
@@ -149,8 +176,11 @@ endif
149176

150177
ifneq ($(findstring s,$(short-opts)),)
151178
silent=1
179+
quiet=silent_
152180
endif
153181

182+
export quiet Q
183+
154184
#
155185
# Define a callable command for descending to a new directory
156186
#

0 commit comments

Comments
 (0)