aboutsummaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-28 23:14:33 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-28 23:24:06 +0200
commit671e69f77a13f4167e1da2e1e21fc8e5714141c8 (patch)
tree7b668f0449558d8b70fc64cc7f97791ac534d83a /travis
parent0fc0c6d8d535fcbf8b7c72d5a6c22c9daa780d49 (diff)
downloadPROJ-671e69f77a13f4167e1da2e1e21fc8e5714141c8.tar.gz
PROJ-671e69f77a13f4167e1da2e1e21fc8e5714141c8.zip
travis/install.sh: fix previous commit that failed on MacOSX
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/install.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/travis/install.sh b/travis/install.sh
index 950ed45f..3c1e92da 100755
--- a/travis/install.sh
+++ b/travis/install.sh
@@ -2,6 +2,17 @@
set -e
+UNAME="$(uname)" || UNAME=""
+if test "${UNAME}" = "Linux" ; then
+ NPROC=$(nproc);
+elif test "${UNAME}" = "Darwin" ; then
+ NPROC=$(sysctl -n hw.ncpu);
+fi
+if test "x${NPROC}" = "x"; then
+ NPROC=2;
+fi
+echo "NPROC=${NPROC}"
+
# Download grid files
wget http://download.osgeo.org/proj/proj-datumgrid-1.8.zip
@@ -27,7 +38,7 @@ if [ -f /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h ]; then
else
../configure --prefix=/tmp/proj_autoconf_install_from_dist_all
fi
-make -j$(nproc)
+make -j${NPROC}
make check
make install
find /tmp/proj_autoconf_install_from_dist_all
@@ -37,7 +48,7 @@ cd ..
mkdir build_cmake
cd build_cmake
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install
-VERBOSE=1 make -j$(nproc)
+VERBOSE=1 make -j${NPROC}
make install
# The cmake build is not able to generate the null file, so copy it at hand
cp /tmp/proj_autoconf_install_from_dist_all/share/proj/null /tmp/proj_cmake_install/share/proj
@@ -55,7 +66,7 @@ cd ../..
mkdir build_autoconf_grids
cd build_autoconf_grids
../configure --prefix=/tmp/proj_autoconf_install_grids
-make -j$(nproc)
+make -j${NPROC}
make check
(cd src && make multistresstest && make test228)
PROJ_LIB=../data src/multistresstest
@@ -74,7 +85,7 @@ if [ "$BUILD_NAME" != "linux_clang" ]; then
else
./configure
fi
-make -j$(nproc)
+make -j${NPROC}
make check
# Rerun tests without grids not included in proj-datumgrid