| I don't know how many hours the author has spent/wasted on this topic (and how many people are now wasting their time coming up with other solutions that in the end do NOT fix the real problem), but... Quite frankly, I find this whole "look i did a horrible hack and let's see who can make the best worst horrible hack" thing quite stupid and silly. GNU Make is free software released under a free license, my opinion is that instead of doing that crazy thing, the author could have just written a patch for GNU Make in order to make it export a "JOBS" environment variable to all its child processes. Oh but yes, "I felt this feature was missing so I added it" is way way way less cool than "geez the gnu make folks are insane lollerplex they have no way to know how many jobs they're running". ALSO: http://www.catb.org/esr/faqs/hacker-howto.html#believe2 Here it is a patched version of GNU Make, providing a #J variable that holds the number of jobs as passed via -j/--jobs: http://santoro.tk/~manu/gnumake.png
As can be seen in the screenshot, it can be passed as environment variable to programs called by makeSource: https://github.com/esantoro/make |
That is to say: He is one of the world experts on GNU Make.
I'm confident that he did this more "for fun" than because he actually wanted to get the number of jobs.