Skip to content

Commit

Permalink
metag: avoid unnecessary builtin dtb rebuilds
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
  • Loading branch information
James Hogan committed Apr 22, 2013
1 parent 82bbb83 commit 0b4184c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arch/metag/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b4184c

Please sign in to comment.