[lkml]   [2014]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] kbuild: Fix output of make kernelrelease

Commit 7ff525712acf "kbuild: fake the "Entering directory ..." message
more simply" changed the output of "make kernelrelease" such that the
kernel release version was not the last line printed. This broke various
tools that would find the kernel release with "make kernelrelease | tail -1".
One of those tools that broke was which resides in the kernel.

If the target of the make is "kernelrelease" do not print the
"Leaving directory ..." message at the end as that will break tools that
expect the kernelrelease version to be the last line outputted.

Fixes: 7ff525712acf "kbuild: fake the "Entering directory ..." message more simply"
Cc: Masahiro Yamada <>
Cc: Peter Foley <>
Cc: Michal Marek <>
Signed-off-by: Steven Rostedt <>
Makefile | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index 05d67af376c5..83fc5f0398a0 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,14 @@ NAME = Shuffling Zombie Juror
# (this increases performance and avoids hard-to-debug behaviour);

+# The target "kernelrelease" requires the last line to be the release
+# of the kernel, not a "Leaving directory ..." message.
+# and other tools require this.
+ifeq ("$(MAKECMDGOALS)", "kernelrelease")
+MAKEFLAGS += --no-print-directory
# Avoid funny character set dependencies
unexport LC_ALL

 \ /
  Last update: 2014-10-22 17:01    [W:0.062 / U:1.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site