From: James Hogan Date: Wed, 17 Apr 2013 09:59:22 +0000 (+0100) Subject: metag: avoid unnecessary builtin dtb rebuilds X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b4184c26b18ecbc0ec0657f514b087c3a6216fb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git metag: avoid unnecessary builtin dtb rebuilds 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 Cc: Vineet Gupta Cc: Grant Likely Cc: Michal Marek Cc: Sam Ravnborg Reviewed-by: Stephen Warren --- diff --git a/arch/metag/boot/dts/Makefile b/arch/metag/boot/dts/Makefile index e0b5afd8bde8..dbd95217733a 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