Bläddra i källkod

kbuild: silence generated makefile message

This patch silences the "make -C /usr/src/git O=/usr/src/git/build/."
message shown when using the generated makefile in KBUILD_OUTDIR.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Peter Foley 14 år sedan
förälder
incheckning
0ff35771fc
1 ändrade filer med 8 tillägg och 1 borttagningar
  1. 8 1
      scripts/mkmakefile

+ 8 - 1
scripts/mkmakefile

@@ -30,6 +30,13 @@ PATCHLEVEL = $4
 lastword = \$(word \$(words \$(1)),\$(1))
 lastword = \$(word \$(words \$(1)),\$(1))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 
 
+ifeq ("\$(origin V)", "command line")
+VERBOSE := \$(V)
+endif
+ifneq (\$(VERBOSE),1)
+Q := @
+endif
+
 MAKEARGS := -C $1
 MAKEARGS := -C $1
 MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
 MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
 
 
@@ -40,7 +47,7 @@ MAKEFLAGS += --no-print-directory
 all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
 all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
 
 
 all:
 all:
-	\$(MAKE) \$(MAKEARGS) \$(all)
+	\$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 
 Makefile:;
 Makefile:;