Instantly share code, notes, and snippets.

Embed
What would you like to do?
# -*- Makefile -*- vim: ft=Makefile
# This expects to be built with make -f
H Ha Hb Hc:
echo halted
define Nr
$(foreach post,a b c,$(eval $(call Nr0,$(1),$(2),$(post))))
endef
define Nr0
H$(1)$(post)%:
make -f $(MF) H$$*$(2)
H$(1)$(post):
make -f $(MF) H$(2)
endef
# a --> bc
# b --> a
# c --> aaa
$(call Nr,a,bc)
$(call Nr,b,a)
$(call Nr,c,aaa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment