linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] metag: avoid unnecessary builtin dtb rebuilds
@ 2013-04-17 10:02 James Hogan
  2013-04-17 15:37 ` Stephen Warren
  0 siblings, 1 reply; 2+ messages in thread
From: James Hogan @ 2013-04-17 10:02 UTC (permalink / raw)
  To: linux-kernel, linux-arch, linux-kbuild
  Cc: James Hogan, Stephen Warren, Vineet Gupta, Grant Likely,
	Michal Marek, Sam Ravnborg

The builtin .dtb.S intermediate file needs to be marked with .SECONDARY
so that it isn't automatically deleted (which causes it to be
regenerated on every build). Also add *.dtb.S to clean-files so it gets
cleaned up by make clean.

Similarly, if the specified builtin dtb isn't already in dtb-y (e.g.
imported into the tree and specified in CONFIG_METAG_BUILTIN_DTB_NAME)
it too will be treated as an intermediate and deleted automatically
(again causing it to be regenerated on every build), so add it to dtb-y
so it gets added to targets and the dtbs target.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/metag/boot/dts/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/metag/boot/dts/Makefile b/arch/metag/boot/dts/Makefile
index e0b5afd..dbd9521 100644
--- a/arch/metag/boot/dts/Makefile
+++ b/arch/metag/boot/dts/Makefile
@@ -4,13 +4,17 @@ dtb-y	+= skeleton.dtb
 builtindtb-y				:= skeleton
 
 ifneq ($(CONFIG_METAG_BUILTIN_DTB_NAME),"")
-	builtindtb-y			:= $(CONFIG_METAG_BUILTIN_DTB_NAME)
+	builtindtb-y			:= $(patsubst "%",%,$(CONFIG_METAG_BUILTIN_DTB_NAME))
 endif
-obj-$(CONFIG_METAG_BUILTIN_DTB)	+= $(patsubst "%",%,$(builtindtb-y)).dtb.o
+
+dtb-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb
+obj-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb.o
 
 targets	+= dtbs
 targets	+= $(dtb-y)
 
+.SECONDARY: $(obj)/$(builtindtb-y).dtb.S
+
 dtbs: $(addprefix $(obj)/, $(dtb-y))
 
-clean-files += *.dtb
+clean-files += *.dtb *.dtb.S
-- 
1.8.1.2



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

* Re: [PATCH 1/1] metag: avoid unnecessary builtin dtb rebuilds
  2013-04-17 10:02 [PATCH 1/1] metag: avoid unnecessary builtin dtb rebuilds James Hogan
@ 2013-04-17 15:37 ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-04-17 15:37 UTC (permalink / raw)
  To: James Hogan
  Cc: linux-kernel, linux-arch, linux-kbuild, Stephen Warren,
	Vineet Gupta, Grant Likely, Michal Marek, Sam Ravnborg

On 04/17/2013 04:02 AM, James Hogan wrote:
> The builtin .dtb.S intermediate file needs to be marked with .SECONDARY
> so that it isn't automatically deleted (which causes it to be
> regenerated on every build). Also add *.dtb.S to clean-files so it gets
> cleaned up by make clean.
> 
> Similarly, if the specified builtin dtb isn't already in dtb-y (e.g.
> imported into the tree and specified in CONFIG_METAG_BUILTIN_DTB_NAME)
> it too will be treated as an intermediate and deleted automatically
> (again causing it to be regenerated on every build), so add it to dtb-y
> so it gets added to targets and the dtbs target.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

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

end of thread, other threads:[~2013-04-17 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-17 10:02 [PATCH 1/1] metag: avoid unnecessary builtin dtb rebuilds James Hogan
2013-04-17 15:37 ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).