make/rules/var-globbed (541 bytes)
1 # NOTE: You can do multiple globs too with clever mapping 2 # if you store a glob in a variable and dereference it in a rule, 3 # it will work UNLESS IT DOESN'T FIND ANY MATCHES, when it will return a 4 # string literal instead. So we use a convolution. 5 6 # storing a glob as a variable (no matches and it returns literally) 7 #patsubst PATTERN,REPLACEMENT,TEXT # pattern can be %.c for example 8 #wildcard GLOB 9 # you might want multiple variables if you have multiple globs you want 10 11 GLOB = $(patsubst <++>,<++>,$(wildcard <++>)) 12 <++> : $(GLOB) 13 <++>