#!/bin/bash

set -e

chmod +x configure

DISABLES="--disable-cairo --disable-libxml2 --disable-opencl --disable-cuda --disable-nvml"
DISABLES="$DISABLES --disable-gl --disable-libnuma --disable-libudev"

if [ `uname` == Darwin ]; then
    ./configure --prefix=$PREFIX --disable-shared $DISABLES
else
    ./configure --prefix=$PREFIX $DISABLES
fi

make
cd tests; make check
make install

#!/bin/bash

chmod +x configure

DISABLES="--disable-cairo --disable-libxml2 --disable-opencl --disable-cuda --disable-nvml"
DISABLES="$DISABLES --disable-gl --disable-libnuma --disable-libudev"

if [ `uname` == Darwin ]; then
    ./configure --prefix=$PREFIX --disable-shared $DISABLES
else
    ./configure --prefix=$PREFIX $DISABLES
fi

make
make check
make install

--- 
+++ 
@@ -1,4 +1,6 @@
 #!/bin/bash
+
+set -e
 
 chmod +x configure
 
@@ -12,5 +14,5 @@
 fi
 
 make
-make check
+cd tests; make check
 make install
Build script: catch errors, run passing tests
