Functions
https://www.gnu.org/software/make/manual/html_node/Functions.html#Functions
Table of Contents
$(filter-out pattern…,text)$(foreach var,list,text)$(word n,text)$(filter-out pattern…,text)- Get the second prerequisite
$(filter-out pattern…,text) reference
objects=main1.o foo.o main2.o bar.o
mains=main1.o main2.o
$(filter-out $(mains),$(objects)) # foo.o bar.o$(foreach var,list,text) reference
All files in
a, b, c, and d:
$(word n,text) reference
$(filter-out pattern…,text) reference
Get the second prerequisite howto
- Only the second one:
$(word 2,$^) - Except the first one:
$(filter-out $<,$^)