'$(MAKE) target' may not work if the top-level Makefile has an uncommon name
Daniel Leidert <[email protected]>
| Newsgroups | gmane.comp.gnu.utils |
|---|---|
| Organization | TU Dresden |
| Message-ID | <1173160434.9441.39.camel@localhost> |
Hello, Maybe I oversaw something, but I think, it should work. What I do: /----- notCalledMakefile ----- # a Makefile, that isn't called Makefile include foo.make test-foo: foo bar: $(MAKE) foo \-------------------- /----- foo.make ----- # foo.make foo: @echo "Just a test." \-------------------- If I try to call the bar target, I get the error: $ make -F notCalledMakefile bar make foo make[1]: Entering directory `/home/dl/test/make' make[1]: *** No rule to make target `foo'. Stop. make[1]: Leaving directory `/home/dl/test/make' make: *** [bar] Error 2 But if I rename this file to Makefile, everything works. Is this intended behaviour? If yes, why? Where can I read more about it? The current workaround is to set MAKEFILES += $(CURDIR)/notCalledMakefile to make this work. Regards, Daniel