public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KBuild: silence "'scripts/unifdef' is up to date."
@ 2011-03-15  6:34 Mike Waychison
  2011-03-15 13:40 ` WANG Cong
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Waychison @ 2011-03-15  6:34 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-kbuild

Patch applies to 2.6.38-rc8.

While changing our build system over to use the headers_install target
as part of our klibc build, the following message started showing up in
our logs:

make[2]: `scripts/unifdef' is up to date.

It turns out that the build blindly invokes a recursive make on this
target, which causes make to emit this message when the target is
already up to date.  This isn't seen for most targets as the rest of the
build relies primarily on the default target and on PHONY targets when
invoking make recursively.

Silence the above message when building unifdef as part of
headers_install by hiding it behind a new PHONY target called
"build_unifdef" that has an empty recipe.

Signed-off-by: Mike Waychison <mikew@google.com>
---
 Makefile         |    2 +-
 scripts/Makefile |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 504f788..5d7e0b2 100644
--- a/Makefile
+++ b/Makefile
@@ -1018,7 +1018,7 @@ hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
 
 PHONY += __headers
 __headers: include/linux/version.h scripts_basic FORCE
-	$(Q)$(MAKE) $(build)=scripts scripts/unifdef
+	$(Q)$(MAKE) $(build)=scripts build_unifdef
 
 PHONY += headers_install_all
 headers_install_all:
diff --git a/scripts/Makefile b/scripts/Makefile
index 2e08810..fcea261 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -18,6 +18,11 @@ always		:= $(hostprogs-y) $(hostprogs-m)
 # The following hostprogs-y programs are only build on demand
 hostprogs-y += unifdef
 
+# This target is used internally to avoid "is up to date" messages
+PHONY += build_unifdef
+build_unifdef: scripts/unifdef FORCE
+	@:
+
 subdir-$(CONFIG_MODVERSIONS) += genksyms
 subdir-y                     += mod
 subdir-$(CONFIG_SECURITY_SELINUX) += selinux


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KBuild: silence "'scripts/unifdef' is up to date."
  2011-03-15  6:34 [PATCH] KBuild: silence "'scripts/unifdef' is up to date." Mike Waychison
@ 2011-03-15 13:40 ` WANG Cong
  2011-03-17 11:32   ` Michal Marek
  0 siblings, 1 reply; 3+ messages in thread
From: WANG Cong @ 2011-03-15 13:40 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel

On Mon, 14 Mar 2011 23:34:25 -0700, Mike Waychison wrote:

> Patch applies to 2.6.38-rc8.
> 
> While changing our build system over to use the headers_install target
> as part of our klibc build, the following message started showing up in
> our logs:
> 
> make[2]: `scripts/unifdef' is up to date.
> 
> It turns out that the build blindly invokes a recursive make on this
> target, which causes make to emit this message when the target is
> already up to date.  This isn't seen for most targets as the rest of the
> build relies primarily on the default target and on PHONY targets when
> invoking make recursively.
> 
> Silence the above message when building unifdef as part of
> headers_install by hiding it behind a new PHONY target called
> "build_unifdef" that has an empty recipe.
> 
> Signed-off-by: Mike Waychison <mikew@google.com> ---

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KBuild: silence "'scripts/unifdef' is up to date."
  2011-03-15 13:40 ` WANG Cong
@ 2011-03-17 11:32   ` Michal Marek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2011-03-17 11:32 UTC (permalink / raw)
  To: WANG Cong; +Cc: linux-kbuild, linux-kernel

On Tue, Mar 15, 2011 at 01:40:37PM +0000, WANG Cong wrote:
> On Mon, 14 Mar 2011 23:34:25 -0700, Mike Waychison wrote:
> 
> > Patch applies to 2.6.38-rc8.
> > 
> > While changing our build system over to use the headers_install target
> > as part of our klibc build, the following message started showing up in
> > our logs:
> > 
> > make[2]: `scripts/unifdef' is up to date.
> > 
> > It turns out that the build blindly invokes a recursive make on this
> > target, which causes make to emit this message when the target is
> > already up to date.  This isn't seen for most targets as the rest of the
> > build relies primarily on the default target and on PHONY targets when
> > invoking make recursively.
> > 
> > Silence the above message when building unifdef as part of
> > headers_install by hiding it behind a new PHONY target called
> > "build_unifdef" that has an empty recipe.
> > 
> > Signed-off-by: Mike Waychison <mikew@google.com> ---
> 
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>

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

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-17 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15  6:34 [PATCH] KBuild: silence "'scripts/unifdef' is up to date." Mike Waychison
2011-03-15 13:40 ` WANG Cong
2011-03-17 11:32   ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox