Register now and start sharing your code snippets.
-->
Nifty alias for the make command to create an optimal amount of processes depending on the number of CPU's you have
Shell Script (Bash) posted 6 months ago by marko
Put this in your ~/.bashrc to automatically adjust the number of processes make creates. This snippet is licensed under the beerware license.
1 # ---------------------------------------------------------------------------- 2 # "THE BEER-WARE LICENSE" (Revision 42): 3 # < marko haapala at aktagon com > wrote this file. As long as you retain this notice you 4 # can do whatever you want with this stuff. If we meet some day, and you think 5 # this stuff is worth it, you can buy me a beer in return. 6 # ---------------------------------------------------------------------------- 7 alias make="make -j$(cat /proc/cpuinfo |grep processor | wc -l)"
Tagged make, number of processors