Thread (21 messages) 21 messages, 7 authors, 2014-11-04
STALE4242d

[PATCH 3/6] dts, arm/arm64: Remove dtbs build rules in sub-makes

From: rric@kernel.org (Robert Richter)
Date: 2014-09-05 06:50:03
Also in: linux-devicetree, linux-kbuild, lkml
Subsystem: arm and arm64 soc sub-architectures (common parts), arm port, arm64 port (aarch64 architecture), the rest · Maintainers: Arnd Bergmann, Krzysztof Kozlowski, Alexandre Belloni, Linus Walleij, Russell King, Catalin Marinas, Will Deacon, Linus Torvalds

From: Robert Richter <redacted>

Add dtb files to build targets and let kbuild handle them. Thus,
special dtbs rules can be removed. This eases Makefiles and the
implementation of the support of vendor dtb subdirectories.

Signed-off-by: Robert Richter <redacted>
---
 arch/arm/Makefile            |  2 +-
 arch/arm/boot/dts/Makefile   | 10 ++--------
 arch/arm64/Makefile          |  2 +-
 arch/arm64/boot/dts/Makefile |  8 ++------
 4 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 1963d9a9a2c4..4d13c6d0a0cc 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -315,7 +315,7 @@ $(BOOT_TARGETS): vmlinux
 PHONY += dtbs dtbs_install
 
 dtbs: prepare scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@
+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE)
 
 dtbs_install:
 	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ab40afb87fb2..cb63c515247c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -492,13 +492,7 @@ dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \
 	dove-d3plug.dtb \
 	dove-dove-db.dtb
 
-targets += dtbs dtbs_install
-targets += $(dtb-y)
 endif
 
-# *.dtb used to be generated in the directory above. Clean out the
-# old build results so people don't accidentally use them.
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	$(Q)rm -f $(obj)/../*.dtb
-
-clean-files := *.dtb
+always		:= $(dtb-y)
+clean-files	:= *.dtb
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 1627861e9bbd..c21b21d6e72d 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -74,7 +74,7 @@ zinstall install: vmlinux
 PHONY += dtbs dtbs_install
 
 dtbs: prepare scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts $@
+	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
 	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 0a14c3828301..d116da5f2f20 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -1,9 +1,5 @@
 dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
 
-targets += dtbs dtbs_install
-targets += $(dtb-y)
-
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-
-clean-files := *.dtb
+always		:= $(dtb-y)
+clean-files	:= *.dtb
-- 
2.0.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help