help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'$(MAKE) target' may not work if the top-level Makefile has an uncommon


From: Daniel Leidert
Subject: '$(MAKE) target' may not work if the top-level Makefile has an uncommon name
Date: Tue, 06 Mar 2007 06:53:53 +0100

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]