On Mon, 2019-08-26 at 10:32 -0700, David Boyce wrote: > My vote is to leave -j alone. Everyone knows it shouldn't be used > that way in production, especially on shared host, but I've been > known to use -j alone when testing out the parallel-safety of a > makefile or in various other ad-hoc test scenarios. I could even > imagine it being used deliberately as a stress test.
If it weren't so devastating if you got it wrong, and so simple to get wrong especially for newbies, I would definitely not even entertain changing it. But it's kind of sucky to have an innocuous typo bring down your entire session, or worse. Maybe, though, Dmitry's idea of changing the default of the -l option would be a better way forward than failing. This would likely have far fewer noticeable consequences to users and setting it sufficiently high probably wouldn't bother anyone while still limiting damage. > What might make more sense to me would be introducing a new syntax > like -j#2 which would evaluate to 2 * $(nproc), with caveats to > previous $(nproc) discussion. I've been toying with the idea of adding -j +N / -j -N which would mean "number of processers [-+] N". Adding * (and /?) could also be done. This could even take a float to allow something like -j *1.5. Regarding nproc: GNU make *does* use gnulib and it seems that gnulib nproc may support Windows as well so that's at least a good baseline. GNU make also supports much more esoteric systems (particularly VMS) which gnulib doesn't even take a stab at. I guess we could disable these features on systems without an nproc equivalent. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make