Directory tree
.
| Makefile
| src
| Makefile
| spec
| test
in ./Makefile
default: all
.DEFAULT:
$(MAKE) -C $@
in src/Makefile
.PHONY: all spec test ...
spec:
bundle exec cucumber ../spec
When I am in the src directory the “make spec” works well.
..././src/# make spec
blablabla
But when I am in the root directory i get that there is “nothing to be done” but it is a phony target
..././# make spec
make: Nothing to be done for `spec'.
I suppose it is a problem with the name of task that is the same as the name of the directory, with a sub makefile.
Yep.
Try something like:
Phony
forward_target is supposed to trigger re-evaluation of%target even when there is an existing file or directory with$@name.