public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly
@ 2013-08-27 13:53 Michal Marek
  2013-08-28 15:11 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Marek @ 2013-08-27 13:53 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel

Use filechk to detect if the content changed or not.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4e3575c..3aa232f 100644
--- a/Makefile
+++ b/Makefile
@@ -794,10 +794,13 @@ PHONY += $(vmlinux-dirs)
 $(vmlinux-dirs): prepare scripts
 	$(Q)$(MAKE) $(build)=$@
 
+define filechk_kernel.release
+	echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
+endef
+
 # Store (new) KERNELRELEASE string in include/config/kernel.release
 include/config/kernel.release: include/config/auto.conf FORCE
-	$(Q)rm -f $@
-	$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
+	$(call filechk,kernel.release)
 
 
 # Things we need to do before we recursively start building the kernel
-- 
1.8.1.4


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

* Re: [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly
  2013-08-27 13:53 [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly Michal Marek
@ 2013-08-28 15:11 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2013-08-28 15:11 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel

On 27.8.2013 15:53, Michal Marek wrote:
> Use filechk to detect if the content changed or not.
> 
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> ---
>  Makefile | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

I merged this to kbuild.git#kbuild now.

Thanks,
Michal


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

end of thread, other threads:[~2013-08-28 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 13:53 [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly Michal Marek
2013-08-28 15:11 ` Michal Marek

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