MIPS: dts: Avoid unneeded built-in.a in DTS dirs
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 16 Apr 2018 15:41:30 +0000 (00:41 +0900)
committerJames Hogan <jhogan@kernel.org>
Mon, 23 Apr 2018 15:38:53 +0000 (16:38 +0100)
arch/mips/boot/dts/Makefile collects objects from sub-directories into
built-in.a only when CONFIG_BUILTIN_DTB is enabled. Reflect it also to
the sub-directory Makefiles. This suppresses unneeded built-in.a
creation in arch/mips/boot/dts/*/ directories.

While I am here, I replaced $(patsubst %.dtb, %.dtb.o, $(dtb-y)) with
$(addsuffix .o, $(dtb-y)) to simplify the code a little bit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Mathieu Malaterre <malat@debian.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/19099/
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/boot/dts/brcm/Makefile
arch/mips/boot/dts/cavium-octeon/Makefile
arch/mips/boot/dts/ingenic/Makefile
arch/mips/boot/dts/lantiq/Makefile
arch/mips/boot/dts/mscc/Makefile
arch/mips/boot/dts/mti/Makefile
arch/mips/boot/dts/netlogic/Makefile
arch/mips/boot/dts/pic32/Makefile
arch/mips/boot/dts/ralink/Makefile
arch/mips/boot/dts/xilfpga/Makefile

index d8787c9a499e4713a7e5092f540fe4d3ba49255b..d85f446cc0ce6a1e52f8a13f273a869b39ec257f 100644 (file)
@@ -34,4 +34,4 @@ dtb-$(CONFIG_DT_NONE) += \
        bcm97425svmb.dtb \
        bcm97435svmb.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 24a8efcd7b038760db523802c4fbca851a740cf4..17aef35f311b8c2e467728870c24262a35c3592f 100644 (file)
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_CAVIUM_OCTEON_SOC)        += octeon_3xxx.dtb octeon_68xx.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 5b1361a89e021c749c7328dbf91a5673dfc0615d..9cc48441eb71912831f0e0424fabd0ec935d0007 100644 (file)
@@ -3,4 +3,4 @@ dtb-$(CONFIG_JZ4740_QI_LB60)    += qi_lb60.dtb
 dtb-$(CONFIG_JZ4770_GCW0)      += gcw0.dtb
 dtb-$(CONFIG_JZ4780_CI20)      += ci20.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 51ab9c1dff42a2553acc2ce559f5629bd41c4ed5..f5dfc06242b9b7bf826ec77f00f47374d79b8106 100644 (file)
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DT_EASY50712)     += easy50712.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index c51164537c02cc34bc0a2156ae9323e49b8ed92b..3c6aed9f5439f8ab8f9a33c7c4ac5601f5cf4931 100644 (file)
@@ -1,3 +1,3 @@
 dtb-$(CONFIG_LEGACY_BOARD_OCELOT)      += ocelot_pcb123.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 3508720cb6d9e1da773e52c7ca21b2ac5cb57c30..b5f7426998b13be4218b9730bba8bf74fbb50933 100644 (file)
@@ -2,4 +2,4 @@
 dtb-$(CONFIG_MIPS_MALTA)       += malta.dtb
 dtb-$(CONFIG_LEGACY_BOARD_SEAD3)       += sead3.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index d630b27950f0605d58d9047cc7ab76090206dafe..45af4224494fe79804bafa62d1c8cfa0b00049ad 100644 (file)
@@ -5,4 +5,4 @@ dtb-$(CONFIG_DT_XLP_FVP)        += xlp_fvp.dtb
 dtb-$(CONFIG_DT_XLP_GVP)       += xlp_gvp.dtb
 dtb-$(CONFIG_DT_XLP_RVP)       += xlp_rvp.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index ba9bcef8fde91dfaa03a75f61cda7c5edb92e464..fb57f36324db7e05238a9ac4d04e5ea7ac479096 100644 (file)
@@ -4,4 +4,4 @@ dtb-$(CONFIG_DTB_PIC32_MZDA_SK)         += pic32mzda_sk.dtb
 dtb-$(CONFIG_DTB_PIC32_NONE)           += \
                                        pic32mzda_sk.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 94bee5b38b53b3701072002e8d5c5939bbfb6dd9..6c26dfa0a9035dbfdc7f4730b8252e177ec4d2fc 100644 (file)
@@ -6,4 +6,4 @@ dtb-$(CONFIG_DTB_MT7620A_EVAL)  += mt7620a_eval.dtb
 dtb-$(CONFIG_DTB_OMEGA2P)      += omega2p.dtb
 dtb-$(CONFIG_DTB_VOCORE2)      += vocore2.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))
index 9987e0e378c50c6f19eb0457eae914f827f9688b..285973fc616999cf0a230a1a24cec771a8438e7f 100644 (file)
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)    += nexys4ddr.dtb
 
-obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
+obj-$(CONFIG_BUILTIN_DTB)      += $(addsuffix .o, $(dtb-y))