I find I\'m writing a lot of Makefiles that could be cleaned up with the use of n-tuple lists. But I can\'t find any way to do this properly (and cleanly). So far I
Thanks for the hints -- after some hacking I think this is more what I was hoping for:
XYZs = \
dog.c:pull_tail:bark \
duck.c:chase:quack \
cow.c:tip:moo
all:
@- $(foreach XYZ,$(XYZs), \
$(eval X = $(word 1,$(subst :, ,$(XYZ)))) \
$(eval Y = $(word 2,$(subst :, ,$(XYZ)))) \
$(eval Z = $(word 3,$(subst :, ,$(XYZ)))) \
\
$(CC) $X -o bully/$Y ; \
ln bully/$Y sounds/$Z ; \
)
Can anyone do better?