diff --git a/.travis.yml b/.travis.yml index 328221c..0ac907d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ install: - export CC=$CC$VERSION - export CXX=$CXX$VERSION - cd ci-scripts - - ./install-deps.sh + - ./install-deps.sh `pwd`/local - cd .. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LD_LIBRARY_PATH=${LATDIR}/ci-scripts/local/lib:$LD_LIBRARY_PATH; fi diff --git a/ci-scripts/install-deps.sh b/ci-scripts/install-deps.sh index 6af31a5..400bbbe 100755 --- a/ci-scripts/install-deps.sh +++ b/ci-scripts/install-deps.sh @@ -1,10 +1,16 @@ #!/usr/bin/env bash +if (( $# != 1 )); then + echo "usage: `basename $0` {osx|linux}" 1>&2 + exit 1 +fi +PREFIX=$1 + set -ex mkdir -p local/build for d in nlopt minuit hdf5; do if [ ! -e local/.built.${d} ]; then - ./install-${d}.sh + ./install-${d}.sh ${PREFIX} fi done -./install-latcore.sh +./install-latcore.sh ${PREFIX} diff --git a/ci-scripts/install-hdf5.sh b/ci-scripts/install-hdf5.sh index e37c36f..c1009b0 100755 --- a/ci-scripts/install-hdf5.sh +++ b/ci-scripts/install-hdf5.sh @@ -2,6 +2,12 @@ NAME='hdf5-1.8.16' +if (( $# != 1 )); then + echo "usage: `basename $0` {osx|linux}" 1>&2 + exit 1 +fi +PREFIX=$1 + set -ex INITDIR=`pwd` cd local/build @@ -9,7 +15,7 @@ wget http://www.hdfgroup.org/ftp/HDF5/current/src/${NAME}.tar.gz tar -xzvf ${NAME}.tar.gz mkdir ${NAME}/build cd ${NAME}/build -../configure --prefix=${INITDIR}/local --enable-cxx +../configure --prefix=${PREFIX} --enable-cxx make -j4 make install cd ${INITDIR}/local diff --git a/ci-scripts/install-latan.sh b/ci-scripts/install-latan.sh index 3272181..1d4dd2a 100755 --- a/ci-scripts/install-latan.sh +++ b/ci-scripts/install-latan.sh @@ -4,17 +4,16 @@ if (( $# != 2 )); then echo "usage: `basename $0` {osx|linux}" 1>&2 exit 1 fi -LATAN_PREFIX=$1 +PREFIX=$1 OS=$2 set -ex -PREFIX=`pwd`/local -./install-deps.sh +./install-deps.sh ${PREFIX} cd .. ./bootstrap.sh mkdir -p build cd build if [[ "$OS" == "osx" ]]; then EXTRA_FLAGS='--with-gsl=/usr/local'; fi -../configure --prefix=$LATAN_PREFIX --with-minuit=$PREFIX --with-nlopt=$PREFIX --with-latcore=$PREFIX --with-hdf5=$PREFIX $EXTRA_FLAGS +../configure --prefix=$PREFIX --with-minuit=$PREFIX --with-nlopt=$PREFIX --with-latcore=$PREFIX --with-hdf5=$PREFIX $EXTRA_FLAGS make -j4 make install diff --git a/ci-scripts/install-latcore.sh b/ci-scripts/install-latcore.sh index c4b7319..d0d3f39 100755 --- a/ci-scripts/install-latcore.sh +++ b/ci-scripts/install-latcore.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +if (( $# != 1 )); then + echo "usage: `basename $0` {osx|linux}" 1>&2 + exit 1 +fi +PREFIX=$1 + set -ex INITDIR=`pwd` cd local/build @@ -13,7 +19,7 @@ else ./bootstrap.sh fi cd build -../configure --prefix=${INITDIR}/local +../configure --prefix=${PREFIX} make -j4 make install cd ${INITDIR} diff --git a/ci-scripts/install-minuit.sh b/ci-scripts/install-minuit.sh index 5599df4..233672e 100755 --- a/ci-scripts/install-minuit.sh +++ b/ci-scripts/install-minuit.sh @@ -2,6 +2,12 @@ NAME='Minuit2-5.34.14' +if (( $# != 1 )); then + echo "usage: `basename $0` {osx|linux}" 1>&2 + exit 1 +fi +PREFIX=$1 + set -ex INITDIR=`pwd` cd local/build @@ -9,7 +15,7 @@ wget http://www.cern.ch/mathlibs/sw/5_34_14/Minuit2/${NAME}.tar.gz tar -xzvf ${NAME}.tar.gz mkdir -p ${NAME}/build cd ${NAME}/build -../configure --prefix=${INITDIR}/local --disable-openmp +../configure --prefix=${PREFIX} --disable-openmp make -j4 make install cd ${INITDIR}/local diff --git a/ci-scripts/install-nlopt.sh b/ci-scripts/install-nlopt.sh index 450c824..1518dc6 100755 --- a/ci-scripts/install-nlopt.sh +++ b/ci-scripts/install-nlopt.sh @@ -2,6 +2,12 @@ NAME='nlopt-2.4.2' +if (( $# != 1 )); then + echo "usage: `basename $0` {osx|linux}" 1>&2 + exit 1 +fi +PREFIX=$1 + set -ex INITDIR=`pwd` cd local/build @@ -9,7 +15,7 @@ wget http://ab-initio.mit.edu/nlopt/${NAME}.tar.gz tar -xzvf ${NAME}.tar.gz mkdir -p ${NAME}/build cd ${NAME}/build -../configure --prefix=${INITDIR}/local --with-cxx --without-guile --without-python --without-octave --without-matlab --with-pic +../configure --prefix=${PREFIX} --with-cxx --without-guile --without-python --without-octave --without-matlab --with-pic make -j4 make install cd ${INITDIR}/local