c28aa9b9c3
We call the Make utility passing the right number of cores to do efficient parallel compilation. The command to do this is simple, but laborious to type every time. Add one to the number of nodes to keep the CPU busy while one is waiting for I/O. Put the entire compilation at a lower priority, both CPU and I/O- wise. This way we don't kill the computer and the user can continue working with other interactive tasks. If there are no other jobs, then it will complete as before. By having a front-end for the compilation, we can later switch to the Ninja generator without disturbing the workflow.
3 lines
115 B
Bash
Executable File
3 lines
115 B
Bash
Executable File
#!/bin/sh
|
|
exec ionice -c2 -n7 nice make -j $(echo "("$(grep -P -c '^processor\t:' /proc/cpuinfo)+1")"/1 | bc) "$@"
|