Skip to contentSkip to conversation

kbuild: silence generated makefile message

PATCH Superseded Peter Foley 3 participants 8 messages Jun 27, 2011 – Jul 20, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 scripts/mkmakefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/mkmakefile +1 -1
index 5325423..f4642f2 100644
@@ -40,7 +40,7 @@ MAKEFLAGS += --no-print-directory
 all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
 
 all:
-	\$(MAKE) \$(MAKEARGS) \$(all)
+	@\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
Signature · 1 line
1.7.5.3
#1 lore raw

Hi,

Quoted 4 lines · Peter Foley

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

I would expect verbose build to show that message. not hides it unconditionally, no ?

- Arnaud

Quoted 26 lines

---
 scripts/mkmakefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/mkmakefile +0 -0
index 5325423..f4642f2 100644
@@ -40,7 +40,7 @@ MAKEFLAGS += --no-print-directory
  all    := \$(filter-out all Makefile,\$(MAKECMDGOALS))
 

 all:
-       \$(MAKE) \$(MAKEARGS) \$(all)
+       @\$(MAKE) \$(MAKEARGS) \$(all)

 Makefile:;

--
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 4 lines · Arnaud Lacombe

Hi,

Quoted 1 line · Peter Foley
Quoted 8 lines
Quoted 3 lines

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

I would expect verbose build to show that message. not hides it unconditionally, no ?

- Arnaud

Good point, I'll fix that.

Thanks,

Peter

#3 lore raw

PATCH v2 1/1 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.

---

V2: Show message when V=1

 scripts/mkmakefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
scripts/mkmakefile +5 -1
index 5325423..ea26f37 100644
@@ -30,6 +30,10 @@ PATCHLEVEL = $4
 lastword = \$(word \$(words \$(1)),\$(1))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 
+ifneq (\$(V),1)
+Q := @
+endif
+
 MAKEARGS := -C $1
 MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
 
@@ -40,7 +44,7 @@ MAKEFLAGS += --no-print-directory
 all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
 
 all:
-	\$(MAKE) \$(MAKEARGS) \$(all)
+	\$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
Signature · 1 line
1.7.5.3
#4 lore raw
Quoted 18 lines · Peter Foley

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

---

V2: Show message when V=1

 scripts/mkmakefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
scripts/mkmakefile +0 -0
index 5325423..ea26f37 100644

scripts/mkmakefile PATCHLEVEL = $4 · line 35

Quoted 6 lines
scripts/mkmakefile +3 -0
@@ -30,6 +30,10 @@ PATCHLEVEL = $4
 lastword = \$(word \$(words \$(1)),\$(1))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 
+ifneq (\$(V),1)
+Q := @
+endif

Please check if V=1 is passed on the commandline and not set in the environmnent, like the toplevel Makefile does:

ifeq ("$(origin V)", "command line")
...

Michal

#5 lore raw

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

---
V2: Show message when V=1
V3: Check if V=1 comes from the commandline

 scripts/mkmakefile |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
scripts/mkmakefile +8 -1
index 5325423..0cc0442 100644
@@ -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:;
 
Signature · 1 line
1.7.6
#6 lore raw

PATCH v3 1/1 kbuild: silence generated makefile message

Quoted 44 lines · Peter Foley

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

---
V2: Show message when V=1
V3: Check if V=1 comes from the commandline

 scripts/mkmakefile |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
scripts/mkmakefile +8 -1
index 5325423..0cc0442 100644
@@ -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:;
 
Signature · 1 line
1.7.6

Ping?

#7 lore raw
In reply to Peter Foley
Quoted 7 lines · Peter Foley

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

---
V2: Show message when V=1
V3: Check if V=1 comes from the commandline

Applied to kbuild-2.6.git#kbuild, thanks.

Michal