$make
FOO inside make is BAR
FOO inside make shell is BAR
FOO inside make parent shell is

Two Flavors of Variables

recursion expansion

foo = $(bar)
bar = $(ugh)
ugh = Huh?
all: ;echo $(foo)

It will cause an infinite loop in variable expansion.

Simply expanded variables

x := foo
y := $(foo) bar
x := later

is equivalent to

y := foo bar
x := later

Automatic Variables

$@ target name

$% target member name, when target is an archive file

$< first prerequisite name

$^ name of all prerequisites, separated with spaces

The eval Function

The eval function allows you to define new makefile constructs that are not
constant. The result of evaluating other variables and functions. The argument
to the eval function is expanded, then the results of that expansion are
parsed as makefile syntax. The expanded results can define new make variables,
targets, implicit or explicit rules, etc.

If in a project, there are multiple targets, say server and client. They are
built with the same instruction structure with only differences in variables.