edep-build.sh
Go to the documentation of this file.
1 #!/bin/bash
2 if [ ${#EDEP_ROOT} == 0 ]; then
3  echo EDEP is not setup yet. You need to source build/edep-setup.sh.
4  echo You can also run cmake and make by hand...
5  exit 1
6 fi
7 
8 
9 BUILD_LOCATION=${EDEP_ROOT}/${EDEP_TARGET}
10 if [ ! -d ${BUILD_LOCATION} ]; then
11  mkdir -p ${BUILD_LOCATION}
12 fi
13 
14 if [ ! -d ${BUILD_LOCATION} ]; then
15  echo Unable to access build location at ${BUILD_LOCATION}
16  exit 1
17 fi
18 
19 cd ${BUILD_LOCATION}
20 
21 if [ ${#1} != 0 -a "x${1}" == "xforce" ]; then
22  shift
23  echo Reconfigure build.
24  if [ -f CMakeCache.txt ]; then
25  rm CMakeCache.txt
26  fi
27  if [ -d CMakeFiles ]; then
28  rm -rf CMakeFiles
29  fi
30 fi
31 
32 if [ ! -f CMakeCache.txt ]; then
33  cmake -DCMAKE_INSTALL_PREFIX=${EDEP_ROOT}/${EDEP_TARGET} ${EDEP_ROOT}
34 fi
35 
36 make $*
37 make install
38 
39 
40