mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mips: Fix dtb build rules
@ 2014-06-11  6:34 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2014-06-11  6:34 UTC (permalink / raw)
  To: barebox

Add intermediate .S files to .SECONDARY. Otherwise make deletes them
and regenerates them each build.
Also remove KBUILD_DTBS since the make system descends in dts/ anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/mips/Makefile     | 5 -----
 arch/mips/dts/Makefile | 5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index b3bacf3..a3cf112 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -146,11 +146,6 @@ dts := arch/mips/dts
 %.dtb: scripts
 	$(Q)$(MAKE) $(build)=$(dts) $(dts)/$@
 
-dtbs: scripts
-	$(Q)$(MAKE) $(build)=$(dts) dtbs
-
-KBUILD_DTBS := dtbs
-
 KBUILD_IMAGE ?= $(KBUILD_BINARY)
 
 #####
diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
index 348b814..7ccb2f8 100644
--- a/arch/mips/dts/Makefile
+++ b/arch/mips/dts/Makefile
@@ -4,9 +4,12 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
 dtb-y += ${BUILTIN_DTB}.dtb
 
+.SECONDARY: $(obj)/$(BUILTIN_DTB).dtb.S
+.SECONDARY: $(patsubst %,$(obj)/%.S,$(dtb-y))
+
 targets += dtbs
 targets += $(dtb-y)
 
-dtbs: $(addprefix $(obj)/, $(dtb-y))
+extra-y += $(dtb-y)
 
 clean-files := *.dtb *.dtb.S
-- 
2.0.0.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-11  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11  6:34 [PATCH] mips: Fix dtb build rules Sascha Hauer

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