Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.

Build with as many cores as there are on the system. #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ if [ ! -f config.mk ]; then
cp make/config.mk config.mk
fi

make -j4
# Use as many CPUs as the host has to build, or default to
# 4 if we're not on a unix-y system.
num_cpus=$(grep -sc ^processor /proc/cpuinfo || echo 4)
make -j$num_cpus

6 changes: 4 additions & 2 deletions build_ps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ fi
sed -i 's/USE_DIST_PS.*/USE_DIST_PS = 1/' config.mk
sed -i 's/PS_PATH.*/PS_PATH = .\/ps-lite/' config.mk

make -j4
# make $1
# Use as many CPUs as the host has to build, or default to
# 4 if we're not on a unix-y system.
num_cpus=$(grep -sc ^processor /proc/cpuinfo || echo 4)
make -j$num_cpus