diff options
Diffstat (limited to 'scripts/Makefile.lib')
| -rw-r--r-- | scripts/Makefile.lib | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 260bf8acfce9..54be19a0fa51 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -159,6 +159,15 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ | |||
| 159 | modname-multi = $(sort $(foreach m,$(multi-used),\ | 159 | modname-multi = $(sort $(foreach m,$(multi-used),\ |
| 160 | $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) | 160 | $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) |
| 161 | 161 | ||
| 162 | # Useful for describing the dependency of composite objects | ||
| 163 | # Usage: | ||
| 164 | # $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add) | ||
| 165 | define multi_depend | ||
| 166 | $(foreach m, $(notdir $1), \ | ||
| 167 | $(eval $(obj)/$m: \ | ||
| 168 | $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) | ||
| 169 | endef | ||
| 170 | |||
| 162 | ifdef REGENERATE_PARSERS | 171 | ifdef REGENERATE_PARSERS |
| 163 | 172 | ||
| 164 | # GPERF | 173 | # GPERF |
