evoldoers / biomake

GNU-Make-like utility for managing builds and complex workflows
BSD 3-Clause "New" or "Revised" License
103 stars 9 forks source link

If a deep dependency fails with "no way to make", only a direct dependency of the main goal is mentioned #80

Open rulatir opened 4 years ago

rulatir commented 4 years ago

Makefile:

foo: bar
    cp $< > $@

bar: vex
    cp $< > $@

vex: irk
    cp $< > $@

irk: baz
    cp $< > $@

baz: naz.in # typo, should be baz.in (what matters is that naz.in doesn't exist)
    cp $< > $@

GNU Make output:

make: *** No rule to make target 'naz.in', needed by 'baz'.  Stop.

biomake -H output:

While building foo: No way to build bar, needed by foo

The error message only mentions a cascade-failing direct dependency of the main goal instead of pointing at the real error like GNU Make does.

The problem can be worked around by attempting to make the failing dependency to discover the next node on the failing path, and so on until the culprit is found. But this workaround shouldn't be necessary.