double colon
'::'を使ったルール。同じターゲットを複数回指定できる。
test3::
echo test3-1
test3::
echo test3-2
として、実行すると次のようになる。
%make test3
echo test3-1
test3-1
echo test3-2
test3-2
%
Implicit ruleに使ってはいけない。
addprefix
echo $(addprefix hello, world)
=>helloworld
間に空白は入らない。
第2引数は複数でもよい。
echo $(addprefix hello, world Japan)
=>helloworld helloJapan
addsuffix
拡張子等を追加するならこれを使う。
echo $(addsuffix .c, foo bar)
=> foo.c bar.c