Merge branch 'master' of ssh://swordfish/srv/www/htdocs/git/engrid
[engrid.git] / src / scripts / rebuild.sh
blobb30712393be346761040712f508a534b123fe2f0
1 #!/usr/bin/env bash
3 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 # + +
5 # + This file is part of enGrid. +
6 # + +
7 # + Copyright 2008,2009 Oliver Gloth +
8 # + +
9 # + enGrid is free software: you can redistribute it and/or modify +
10 # + it under the terms of the GNU General Public License as published by +
11 # + the Free Software Foundation, either version 3 of the License, or +
12 # + (at your option) any later version. +
13 # + +
14 # + enGrid is distributed in the hope that it will be useful, +
15 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
16 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
17 # + GNU General Public License for more details. +
18 # + +
19 # + You should have received a copy of the GNU General Public License +
20 # + along with enGrid. If not, see <http:#www.gnu.org/licenses/>. +
21 # + +
22 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 # DESCRIPTION:
25 # This is a testing script that is run every night to make sure that engrid compiles from scratch with all available configurations.
26 # USAGE:
27 # This script must be run from the "engrid/src" directory.
29 set -ex
31 FAILURE=0
33 #set up environment
34 source ./scripts/setup_paths.sh engits yes
36 echo "BUILDING TOOLS":
37 echo "gcc = $(which gcc)"
38 echo "g++ = $(which g++)"
39 echo "qmake = $(which qmake)"
40 echo "make = $(which make)"
41 gcc -v
42 g++ -v
43 qmake -v
44 make -v
46 echo "PATHS:"
47 echo QTDIR = $QTDIR
48 echo VTKLIBDIR = $VTKLIBDIR
49 echo VTKINCDIR = $VTKINCDIR
50 echo CGNSINCDIR = $CGNSINCDIR
51 echo CGNSLIBDIR = $CGNSLIBDIR
52 echo PATH = $PATH
53 echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH
55 echo "Building netgen"
56 ./scripts/build-nglib.sh
58 MAKEOPTIONS=""
60 MSG="Building engrid.pro debug version"
61 echo $MSG
62 qmake && make distclean && qmake engrid.pro && make $MAKEOPTIONS debug || FAILURE=1
63 if [ $FAILURE -eq 1 ]
64 then
65 echo "$MSG failed."
66 exit 1
69 MSG="Building engrid.pro.cgns debug version"
70 echo $MSG
71 qmake && make distclean && qmake engrid.pro.cgns && make $MAKEOPTIONS debug || FAILURE=1
72 if [ $FAILURE -eq 1 ]
73 then
74 echo "$MSG failed."
75 exit 1
78 MSG="Building engrid.pro release version"
79 echo $MSG
80 qmake && make distclean && qmake engrid.pro && make $MAKEOPTIONS release || FAILURE=1
81 if [ $FAILURE -eq 1 ]
82 then
83 echo "$MSG failed."
84 exit 1
87 MSG="Building engrid.pro.cgns release version"
88 echo $MSG
89 qmake && make distclean && qmake engrid.pro.cgns && make $MAKEOPTIONS release || FAILURE=1
90 if [ $FAILURE -eq 1 ]
91 then
92 echo "$MSG failed."
93 exit 1
96 echo "SUCCESS: Everything compiles."