Commit 35bce88f authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Shut up "make clean" in non-verbose mode

$(call ...) has a measurable performance impact, so use the new
variable $(Q), which evaluates to @ when quiet to supress
the echoing of commands if not wanted.

IIRC, Keith Owens' kbuild-2.5 came up with that idea, so credit goes
there.
parent 4123c52c
...@@ -109,8 +109,12 @@ MAKEFLAGS += --no-print-directory ...@@ -109,8 +109,12 @@ MAKEFLAGS += --no-print-directory
# If the user wants quiet mode, echo short versions of the commands # If the user wants quiet mode, echo short versions of the commands
# only # only
ifneq ($(KBUILD_VERBOSE),1) ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_ quiet=quiet_
Q = @
endif endif
# If the user is running make -s (silent mode), suppress echoing of # If the user is running make -s (silent mode), suppress echoing of
...@@ -120,7 +124,7 @@ ifneq ($(findstring s,$(MAKEFLAGS)),) ...@@ -120,7 +124,7 @@ ifneq ($(findstring s,$(MAKEFLAGS)),)
quiet=silent_ quiet=silent_
endif endif
export quiet KBUILD_VERBOSE export quiet Q KBUILD_VERBOSE
# Paths to obj / src tree # Paths to obj / src tree
...@@ -698,7 +702,7 @@ MRPROPER_DIRS += \ ...@@ -698,7 +702,7 @@ MRPROPER_DIRS += \
clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts
$(addprefix _clean_,$(clean-dirs)): $(addprefix _clean_,$(clean-dirs)):
$(MAKE) MAKEFILES= -rR -f scripts/Makefile.clean obj=$(patsubst _clean_%,%,$@) $(Q)$(MAKE) MAKEFILES= -rR -f scripts/Makefile.clean obj=$(patsubst _clean_%,%,$@)
quiet_cmd_rmclean = RM $$(CLEAN_FILES) quiet_cmd_rmclean = RM $$(CLEAN_FILES)
cmd_rmclean = rm -f $(CLEAN_FILES) cmd_rmclean = rm -f $(CLEAN_FILES)
......
...@@ -38,5 +38,5 @@ endif ...@@ -38,5 +38,5 @@ endif
.PHONY: $(subdir-ymn) .PHONY: $(subdir-ymn)
$(subdir-ymn): $(subdir-ymn):
$(MAKE) -rR -f scripts/Makefile.clean obj=$@ $(Q)$(MAKE) -rR -f scripts/Makefile.clean obj=$@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment