📝 Edit page
➕ Add page
Access
Make variable
Use as a Make variable:
Makefile
FOO = a BAR = 1 test: echo "$(FOO) $(BAR)"
$ make test
echo "a 1"
a 1
The quotes are not strictly needed.
Note that if you use single quotes, the variables will still be evaluated.
Shell variable
Or use it as a Shell variable. NB. The $
must be escaped as $$
.
FOO = a
BAR = 1
test:
echo "$(FOO) $(BAR)"