> and = as semi-function definition.
Variable binding.
Variable binding.
build = cc -c -o $@ $<
file1.o: file1.c
$(build)
file2.o: file2.c
$(build)
(This is meant to illustrate the difference, this isn't a good makefile.)To reinforce the notion that variables are really functions, you can even supply arguments when you call them:
# reverse is a function
reverse = $(2) $(1)
# eventually expands to 2 1
a = $(call reverse,1,2)