I playing with Docker and make utility and try to write rule which rebuilds docker image only on Dockerfile change.
My project structure looks like:
tree .
Your "targets" default
run
and build
are "phony" targets. That is an abstract concept, not a real file. Such phony targets, should not have a recipe (because you can't make them). They should instead depend on real files, or perhaps other phony targets, and so on, but everything must eventually depend on real files only.
Your phony targets should be marked as such
.PHONY: default run build
The real targets, on the other hand, should have a recipe - the recipe makes that target.
So, first depend your phony targets, without a recipe, on a real target(s).
Then have real targets have recipes.
I have posted some guidelines at makefile enforce library dependency ordering