KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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've only been able to come up with using $(shell ...) and tr , sed , or otherwise non-Makefile standards. For example, I'd like to do this: XYZs = \ dog.c pull_tail bark \ duck.c chase quack \ cow.c tip moo all: @- $(foreach X Y Z,$(XYZs), \ $(CC) $X -o bully/$Y ; \ ln bully/$Y sounds/$Z ; \ ) Is there a good way to iterate n -tuple lists in Makefiles? Thanks!
Tags (comma-separated)
Save Edits
Cancel