Need card #358 · Relevance High · Status New

Concurrency issues with recursive make and parallel jobs

Updated 10/9/2026, 22:03:14

Problem

When using recursive make, the -j flag only applies to the top‑level invocation; child make processes must inherit the jobserver via $(MAKE) or other mechanisms, otherwise race conditions and instability arise. Developers often need to upgrade gmake 4.4 or set MAKEFLAGS manually, which can cause build errors or reduced performance.

Pain points

Questions to verify

Evidence

quote · @匿名
The `-j` is meant for the top-level invocation only, and the $(MAKE) pattern is standard.The `+` or $(MAKE) "tricks" to ensure the jobserver is inherited in submake and any other subprocess are no longer needed in gmake 4.4 (from 2022) because it defaults to a FIFO instead of pipes. The author should just upgrade gmake :).
quote · @匿名
Setting environment variable `MAKEFLAGS=-j8` transfers to subprocesses.
quote · @匿名
How it works is that the top-level invocation runs the job server, and the children feed requests to it. The top-level controls the parallelism.
quote · @匿名
Don't do it!https://accu.org/journals/overload/14/71/miller_2004/Recursive Make Considered HarmfulBy Peter Miller

Disclaimer: this card is distilled by AI from community discussions as “pain point evidence”. It is a starting point for need analysis and validation, not a “validated market need”. AI has analytical limits; please open the original discussion above to manually verify before key decisions.