This is my makefile:
all: first second
second:
@echo "==Building second=="
first:
@echo "==Building first=="
If there is a directory named second, the rule with the same name will be completely ignored by the makefile. If there isn't, everything goes normally.
Note that this happens whether or not the second folder as a Makefile in it.
I ran on this issue while organizing my project: I thought about creating a general Makefile which then invokes the Makefiles in each directories.. so to me it appears natural that the rule has the same name as the folder.
The solution is trivial: change the rule name inside the Makefile...but this behavior seems rather odd: do you have any idea/insight on this, and another possible solution?
I am using GNU Make 3.81, inside Bash 4.2.25, under Ubuntu 12.04.2 LTS.
secondrule to invokesecond/Makefilefrom withinsecond/, is that correct? - Beta