I want to write a Makefile which is able to forward all given targets to a Makefile in a different directory. For simplicity the forwarding itself is removed from the example, because the problem starts earlier.
But I struggle with the very basic things:
.PHONY: x
%:
@echo Default rule
__dummy__:
@echo No targets rule
- If I call
make
without parms: “No targets rule” is printed what is expected. - If I call
make y
: “No targets rule” is executed, expected! - But if I call
make x
:make: Nothing to be done for 'x'.
is printed which makes me wonder!
x as file or directory should be allowed to be in the current directory.
How can I forward all calls to make
to catch one of my rules? In other words: How write a rule that picks all phony targets as well.