-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmakeall.sh
executable file
·127 lines (113 loc) · 2.59 KB
/
makeall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/bash
QTVERS=`qmake --version|sed -n 2,2p|awk '{print $4}'`
echo "Make All for Qt Version ${QTVERS} ..."
QTMAJV=`echo ${QTVERS}|cut -d. -f1`
if [ `echo "45"|grep -ci "${QTMAJV}"` -eq 0 ]; then
echo "Wrong qmake, check environment"
echo " QT Major version must be 4 or 5; is ${QTMAJV}"
qmake --version
exit
fi
MKARGS="$@"
if [ $# -eq 0 ]; then
MKARGS="-j 7"
if [ `uname -s|grep -ci "msys"` -ne 0 ]; then
MKARGS="-j 2"
fi
if [ `uname -s|grep -ci "mingw"` -ne 0 ]; then
MKARGS="-j 2"
fi
echo "MKARGS=$MKARGS"
fi
export MAKE="make ${MKARGS}"
ISMAC=0
FIXMAC=""
if [ "`uname -s`" = "Darwin" ]; then
ISMAC=1
FIXMAC=./fix-mac-make.sh
fi
ISWIN=0
if [ `uname -s|grep -ci "mingw"` -ne 0 ]; then
ISWIN=1
fi
if [ `uname -s|grep -ci "cygwin"` -ne 0 ]; then
(cd programs/us;./revision.sh)
echo "*** A Windows build must be done in the MSYS window!!! ***"
exit 1
fi
ISL64=0
if [ `uname -m|grep -ci "x86_64"` -ne 0 ]; then
ISL64=1
fi
DOMAN=1
DODOX=1
if [ -z "`which tpage`" ]; then
DOMAN=0
fi
if [ -z "`which doxygen`" ]; then
DODOX=0
fi
if [ -z "`which latex`" ]; then
DODOX=0
fi
if [ -z "`which dvips`" ]; then
DODOX=0
fi
DIR=$(pwd)
rm -f build.log
NBERR=0
for d in qwtplot3d utils gui programs/*
do
if [ ! -d $d ]; then continue; fi
if [ $d == "programs/config2" ]; then continue; fi
if [ $d == "programs/us_1dsa" ]; then continue; fi
if [ $d == "programs/us_mpi_analysis" ]; then continue; fi
if [ $d == "programs/us_mwla_viewer" ]; then continue; fi
pushd $d
sdir=`pwd`
if [ $ISMAC -eq 0 ]; then
qmake *.pro
else
qmake *.pro
if [ "$d" = "gui" ]; then
${FIXMAC}
fi
fi
echo "Making in $d" >> $DIR/build.log
(cd $sdir;${MAKE} 2>&1) >> $DIR/build.log
stat=$?
if [ $stat -gt 0 ]; then
echo " ***ERROR*** building $d"
NBERR=`expr ${NBERR} + 1`
fi
popd
done
if [ $DOMAN -ne 0 ]; then
d=doc/manual
pushd $d
sdir=`pwd`
echo "Making in $d" >> $DIR/build.log
(cd $sdir;${MAKE} 2>&1) >> $DIR/build.log
stat=$?
if [ $stat -gt 0 ]; then
echo " ***ERROR*** building $d"
NBERR=`expr ${NBERR} + 1`
fi
popd
fi
if [ $DODOX -ne 0 ]; then
echo "Running doxygen ..."
##doxygen >> $DIR/build.log 2>$DIR/doxy.err
doxygen >> $DIR/build.log &
else
echo "NO Doxygen used"
fi
if [ $ISMAC -ne 0 ]; then
echo "Running libnames and appnames ..." |tee -a $DIR/build.log
$DIR/libnames.sh >> $DIR/build.log
$DIR/appnames.sh >> $DIR/build.log
fi
if [ $NBERR -gt 0 ]; then
echo "*** $NBERR Build Error(s) ***"
echo "*** $NBERR Build Error(s) ***" >> $DIR/build.log
fi