#!/bin/bash if [ "$make_install" = "yes" ]; then install_prefix=$SIMPATH_INSTALL else install_prefix=$SIMPATH/basics/MillepedeII fi checkfile=$install_prefix/bin/pede if (not_there Millepede $checkfile); then cd $SIMPATH/basics/MillepedeII if [ "$platform" = "macosx" ]; then # patch needed since the gcc of Apple does not have gfortran patch -p0 < ../Makefile_millepede.patch | tee -a $logfile fi make # fake make install mkdir -p $install_prefix/bin cp $SIMPATH/basics/MillepedeII/pede $install_prefix/bin cp ../CMakeLists.txt_libMille CMakeLists.txt mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=$install_prefix make install if [ "$platform" = "macosx" ]; then cd $install_prefix/lib create_links dylib so fi check_success Millepede $checkfile check=$? fi if [ "$platform" = "macosx" ]; then export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$install_prefix else export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SIMPATH/install_prefix fi cd $SIMPATH return 1