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>
This commit is contained in:
committed by
Tom Rini
parent
87e90729ea
commit
cb6e7b0db9
@@ -160,6 +160,15 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
|
||||
modname-multi = $(sort $(foreach m,$(multi-used),\
|
||||
$(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
|
||||
|
||||
# Useful for describing the dependency of composite objects
|
||||
# Usage:
|
||||
# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
|
||||
define multi_depend
|
||||
$(foreach m, $(notdir $1), \
|
||||
$(eval $(obj)/$m: \
|
||||
$(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
|
||||
endef
|
||||
|
||||
ifdef REGENERATE_PARSERS
|
||||
|
||||
# GPERF
|
||||
|
||||
Reference in New Issue
Block a user