summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-07-15 15:25:15 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-07-15 15:25:15 (GMT)
commitd3fd45b248bd1ce5df383b5a40732ffba3e7d952 (patch)
treebdb8484d55e7005df41b6e610508243a8a54e69e /scripts
parent14160d248a0f36416e84ad3e92f78226e5759ace (diff)
allow NUMJOBS and NUMCPU + explanations. fix tabs.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mingw-x-build-dependencies.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh
index 1b76f80..338051f 100755
--- a/scripts/mingw-x-build-dependencies.sh
+++ b/scripts/mingw-x-build-dependencies.sh
@@ -16,8 +16,8 @@
OPENSCADDIR=$PWD
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
- echo "Must be run from the OpenSCAD source root directory"
- exit 0
+ echo "Must be run from the OpenSCAD source root directory"
+ exit 0
fi
BASEDIR=$HOME/openscad_deps
MXEDIR=$BASEDIR/mxe
@@ -28,10 +28,19 @@ echo BASEDIR: $BASEDIR
echo OPENSCADDIR: $OPENSCADDIR
echo PATH modified with $MXEDIR/usr/bin
if [ ! $NUMCPU ]; then
- echo "note: you can 'export NUMCPU=x' for paralell builds (x=number)";
+ echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)";
NUMCPU=1
fi
+if [ ! $NUMJOBS ]; then
+ echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once"
+ if [ $NUMCPU -gt 2 ]; then
+ NUMJOBS=$((NUMCPU/2))
+ else
+ NUMJOBS=1
+ fi
+fi
echo NUMCPU: $NUMCPU
+echo NUMJOBS: $NUMJOBS
echo "Downloading MXE into " $MXEDIR
cd $BASEDIR
@@ -39,8 +48,8 @@ cd $BASEDIR
git clone git://github.com/mxe/mxe.git
cd $MXEDIR
-make -j $NUMCPU JOBS=$NUMCPU mpfr eigen opencsg cgal qt
-#make -j $NUMCPU JOBS=1 mpfr # for testing
+make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS
+#make mpfr -j$NUMCPU JOBS=$NUMJOBS # for testing
echo 'make'
echo "leaving" $MXEDIR
contact: Jan Huwald // Impressum