Reputation: 5412
Here is my makefile:
z : a
echo "REDOING Z" ; touch z
a : b b2
touch a
touch a2
touch z # should disable z but doesn't
b : c c2
touch b
touch b2
When I do make a
, z
is touched twice, I want it to only be touched once, how do I do that?
Upvotes: 0
Views: 36
Reputation: 136306
The targets and recipes are in disconnect here: the recipes should only produce its targets, not other targets. E.g.:
z : a
touch z
a : b b2
touch a
b : c c2
touch b
# add rules for b2, c and c2
Upvotes: 1