summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mkmakefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 5325423ceab4..0cc044260744 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -30,6 +30,13 @@ PATCHLEVEL = $4
lastword = \$(word \$(words \$(1)),\$(1))
makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
+ifeq ("\$(origin V)", "command line")
+VERBOSE := \$(V)
+endif
+ifneq (\$(VERBOSE),1)
+Q := @
+endif
+
MAKEARGS := -C $1
MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
@@ -40,7 +47,7 @@ MAKEFLAGS += --no-print-directory
all := \$(filter-out all Makefile,\$(MAKECMDGOALS))
all:
- \$(MAKE) \$(MAKEARGS) \$(all)
+ \$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
Makefile:;