Consider the following Makefile: all: a.gz b.gz
a.gz b.gz: touch a gzip a touch b gzip b If you run it with 'make -j1', it runs fine. But if you run it with 'make -j2', - target "a.gz" must be built, spawning job 1 to build "a.gz b.gz" - target "b.gz" must be built, spawning job 2 to build "a.gz b.gz" - they trip over each other and the build crashes There are plenty of workarounds, but this strikes me as a bizarre default behavior. Shouldn't the rule "a.gz b.gz" should only be run once, regardless of -jN? This is how 'make -j2' should have gone: - target "a.gz" must be built, spawning job 1 to build "a.gz b.gz" - target "b.gz" must be built, but the rule to build it, "a.gz b.gz", is already being executed. No job is spawned. I ask because I just spent a few hours debugging a Makefile with the false assumption that "a.gz b.gz" would only be run once. It's intuitive that each each target should be built with a "task queue" rather than a "parallel free-for-all", and I'm sure this design decision has lead to pain for a lot of other programmers, too. Thanks, Brian
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make