Recently Written · git

tmpl

Insanely simple templates

git clone https://github.com/equwal/tmpl

Log | Files | Refs


make/functions/foreach-complex (373 bytes)

1 #foreach VAR,LIST,TEXT
2 # VAR and LIST are expanded
3 # VAR is set to each item in LIST and TEXT is expanded repeatedly
4 # so text is expanded $(words LIST) times
5 # you probably will use VAR each time...
6 # example:
7 # words = I love jesus dick
8 # foreach word,$(words),$(shell echo $(word))
9 var = <++> # i or something
10 list = <++>
11 text = <++>
12 $(foreach $(var), $(list), $(text))