summaryrefslogtreecommitdiff
path: root/tools/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build.sh')
-rwxr-xr-xtools/build.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/build.sh b/tools/build.sh
index 185fe791..a37b06f4 100755
--- a/tools/build.sh
+++ b/tools/build.sh
@@ -3,10 +3,13 @@
flavor=$1
shift 1
-time ( \
- cd ~/src/ledger ; \
- PATH=/usr/local/bin:/opt/local/bin:$PATH \
- nice -n 20 ./acprep $flavor --debug --python --doxygen make "$@" && \
- PATH=/usr/local/bin:/opt/local/bin:$PATH \
- nice -n 20 ./acprep $flavor --debug --python --doxygen check "$@" \
-) \ No newline at end of file
+JOBS=-j$(sysctl -n hw.activecpu)
+OPTIONS="$flavor --debug --python --doxygen $JOBS"
+
+time ( \
+ cd ~/src/ledger ; \
+ PATH=/usr/local/bin:/opt/local/bin:$PATH \
+ nice -n 20 ./acprep $OPTIONS make "$@" && \
+ PATH=/usr/local/bin:/opt/local/bin:$PATH \
+ nice -n 20 ./acprep $OPTIONS check "$@" \
+)