GNU make memo
Variables memo
Substitution. := or =
:= is replaced when Makefile is read. Then the order matters. But it is explicit.
= is replaced when the variable is used. Then this is hard to use (for me).
% wildcard
For dependency setting,
dirs := foo bar baz $(dirs:%=%/all): base
will replace the variable
dirs
to "
foo/all bar/all baz/all
". So, these
dirs
depends on the
base
.
Copyright (C) 2010-2018 Hitoshi Yamauchi