snestracker icon indicating copy to clipboard operation
snestracker copied to clipboard

Fix multiprocessing in Makefiles

Open OPNA2608 opened this issue 5 years ago • 0 comments

Fixes make's self-identification of recursive make calls in rules, required to fix multiprocessing (invoking make with e.g. -j2).

Warning when attempting to run e.g. make -j2 on v0.2.0 (middle of execution):

make -C snes_driver
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

See GNU make Error Message, Section "warning: jobserver unavailable: using -j1. Add `+' to parent make rule." and How the MAKE Variable Works.

Build time measurements via time:

unfixed, -j1 real 1m36,646s user 1m20,740s sys 0m15,071s

unfixed, -j6 (ignored by recursive make invocations, essentially -j1) real 1m35,451s user 1m19,411s sys 0m15,300s

fixed, -j6 real 0m24,334s user 1m48,657s sys 0m19,671s

OPNA2608 avatar Dec 01 '20 13:12 OPNA2608