@depends_on
Only valid: inside @goal
.
Syntax:
@depends_on goal1 [ goal2 [ goal3 [...] ] ]
Declares a dependency on other goal.
Example Makesurefile
:
@goal a
echo a
@goal b
@depends_on a
echo b
Running ./makesure b
will show
goal 'a' ...
a
goal 'b' ...
b
You can declare multiple dependencies for a goal:
@goal a
echo a
@goal b
@depends_on a
echo b
@goal c
echo c
@goal d
@depends_on b c
echo d
Running ./makesure d
will show
goal 'a' ...
a
goal 'b' ...
b
goal 'c' ...
c
goal 'd' ...
d
Circular dependency will cause an error:
@goal a
@depends_on b
@goal b
@depends_on c
@goal c
@depends_on a
Running ./makesure a
will show
There is a loop in goal dependencies via a -> c