X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=scripts%2FMakefile.lib;h=9d1383a38f727982a52fa2b6e87a8d72f8b63591;hb=cb6e7b0db9eb602c0cd8a704957619909bdfdb1b;hp=072abaafb189b9f512a677e67ca2a571af2ce2c4;hpb=87e90729eafeec1ee8f0f6abfffb839f6e464fc2;p=karo-tx-uboot.git diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 072abaafb1..9d1383a38f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -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