summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-30 11:06:10 +0900
committerTom Rini <trini@ti.com>2014-11-07 16:27:06 -0500
commitcb6e7b0db9eb602c0cd8a704957619909bdfdb1b (patch)
tree00e4363461daa58531f0df27790d80c407b70d3b /scripts/Makefile.build
parent87e90729eafeec1ee8f0f6abfffb839f6e464fc2 (diff)
downloadtalos-obmc-uboot-cb6e7b0db9eb602c0cd8a704957619909bdfdb1b.tar.gz
talos-obmc-uboot-cb6e7b0db9eb602c0cd8a704957619909bdfdb1b.zip
kbuild: improve multi-objs dependency and cleanups
Since Linux 3.18-rc1, Kbuild is able to handle multi-objs dependency correctly, which also allows us futher cleanups of some makefiles. This commit imports those commits: [1] commit c8589d1e9e01 by Masahiro Yamada kbuild: handle multi-objs dependency appropriately [2] commit 97e3226e6e98 by Masahiro Yamada kbuild: handle the dependency of multi-objs hostprogs appropriately [3] commit 022af62d0190 by Masahiro Yamada kbuild: refactor script/kconfig/Makefile [4] commit 221ecca6cafe by Masahiro Yamada kbuild: remove redundant clean-files from scripts/kconfig/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 6742ddd0b8..3e12b57306 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -400,16 +400,14 @@ cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalys
quiet_cmd_link_multi-m = LD [M] $@
cmd_link_multi-m = $(cmd_link_multi-y)
-# We would rather have a list of rules like
-# foo.o: $(foo-objs)
-# but that's not so easy, so we rather make all composite objects depend
-# on the set of all their parts
-$(multi-used-y) : %.o: $(multi-objs-y) FORCE
+$(multi-used-y): FORCE
$(call if_changed,link_multi-y)
+$(call multi_depend, $(multi-used-y), .o, -objs -y)
-$(multi-used-m) : %.o: $(multi-objs-m) FORCE
+$(multi-used-m): FORCE
$(call if_changed,link_multi-m)
@{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)
+$(call multi_depend, $(multi-used-m), .o, -objs -y)
targets += $(multi-used-y) $(multi-used-m)
OpenPOWER on IntegriCloud