Commit e4833b2d authored by Alexandre Lision's avatar Alexandre Lision Committed by Alexandre Lision

osx: fix nproc not found

- contrib does not support more than 2 parallels processors.
- let python find out how many processors are usable

Tuleap: #449
Change-Id: Ic876a38d567f5b4a3911872b260687b18505a7e1
parent a6b60971
......@@ -12,6 +12,7 @@ import subprocess
import sys
import time
import platform
import multiprocessing
DEBIAN_BASED_DISTROS = [
'Debian',
......@@ -128,7 +129,7 @@ def run_dependencies(args):
def run_install(args):
install_args = ''
install_args = ' -p ' + str(multiprocessing.cpu_count())
if args.static:
install_args += ' -s'
if args.global_install:
......
......@@ -7,13 +7,15 @@
# -g: install globally instead for all users
# -s: link everything statically, no D-Bus communication. More likely to work!
# -c: client to build
# -p: number of processors to use
set -ex
global=false
static=''
client=''
while getopts gsc: OPT; do
proc=''
while getopts gsc:p: OPT; do
case "$OPT" in
g)
global='true'
......@@ -24,6 +26,9 @@ while getopts gsc: OPT; do
c)
client="${OPTARG}"
;;
p)
proc="${OPTARG}"
;;
\?)
exit 1
;;
......@@ -56,7 +61,7 @@ cd contrib
mkdir -p native
cd native
../bootstrap
make -j$(nproc)
make -j2
cd "${DAEMON}"
./autogen.sh
if $global; then
......@@ -64,7 +69,7 @@ if $global; then
else
./configure $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
fi
make -j$(nproc)
make -j${proc}
make_install $global
cd "${TOP}/lrc"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment