Wed Dec 26 12:05:19 EST 2012

GNU Make rule recursion

I'm having trouble with parallel make.  As far as I can see, all my
deps are proper, but sometimes make exits with gcc linker stage

    abc.o: No such file or directory

I don't see much in the debug output except this, which I don't

    Avoiding implicit rule recursion.

I'm still not sure what this is, but 2 things fixed it, splitting the original rule into to, i.e. from

$(BUILD)/%.elf: $(BUILD)/%.elf $(BUILD)/lib.a


$(BUILD)/%.x: $(BUILD)/lib.a
$(BUILD)/%.elf: $(BUILD)/%.elf $(BUILD)/%.x

and to change to static pattern rules[1].  I'm sticking with the latter.

[1] http://www.gnu.org/software/make/manual/html_node/Static-Pattern.html