The complicated part of multi_depend is the same as suffix-search. Reuse it.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -238,7 +238,7 @@ endif · 237 unmodified lines | |||
| 238 | define multi_depend | 238 | define multi_depend |
| 239 | $(foreach m, $(notdir $1), \ | 239 | $(foreach m, $(notdir $1), \ |
| 240 | $(eval $(obj)/$m: \ | 240 | $(eval $(obj)/$m: \ |
| 241 | $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) | 241 | $(addprefix $(obj)/, $(call suffix-search, $m, $2, $3)))) |
| 242 | endef | 242 | endef |
| 243 | 243 | ||
| 244 | # Copy a file | 244 | # Copy a file |