Browse Source

Limit number of parallel builds to CPU core count

master
Kristaps Kaupe 4 years ago
parent
commit
c0d6610df0
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 6
      install.sh

6
install.sh

@ -4,6 +4,10 @@ check_exists() {
command -v "$1" > /dev/null
}
num_cores() {
python -c 'import multiprocessing as mp; print(mp.cpu_count())'
}
# This is needed for systems where GNU is not the default make, like FreeBSD.
if check_exists gmake; then
make=gmake
@ -475,7 +479,7 @@ main ()
export PKG_CONFIG_PATH="${jm_root}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="${jm_root}/lib:${LD_LIBRARY_PATH}"
export C_INCLUDE_PATH="${jm_root}/include:${C_INCLUDE_PATH}"
export MAKEFLAGS='-j'
export MAKEFLAGS="-j $(num_cores)"
# os check
install_os="$( install_get_os )"

Loading…
Cancel
Save