Newer
Older
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
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "Usage: $0 <list of projects>"
exit 2 ;
fi
strict=false; export strict;
if [ X$1 = X-strict ] ; then
strict=true; export strict;
fi
PROJECTS="$@" ; export PROJECTS ;
FSLDIR=`pwd`
FSLDEVDIR=${FSLDIR}
FSLCONFDIR=${FSLDIR}/config
FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh`
export FSLDIR FSLDEVDIR FSLCONFDIR FSLMACHTYPE
buildmessages="" ; export buildmessages ;
if [ $strict = false ] ; then
# If this machine doesn't exist in standard config, link to the generic form
if [ ! -d ${FSLCONFDIR}/${FSLMACHTYPE} ] ; then
( cd ${FSLCONFDIR} ; ln -s generic ${FSLMACHTYPE} ; buildmessages="WARNING: Did not find specific configuration for ${FSLMACHTYPE} - trying generic version instead"; echo "$buildmessages" ; )
fi
# Make freeware if it exists
if [ -d ${FSLDIR}/src/freeware ] ; then
( cd ${FSLDIR}/src/freeware ; make FSLDIR=${FSLDIR} FSLCONFDIR=${FSLCONFDIR} )
fi
# Make the extras if they are installed in the same fsl tree
if [ -d ${FSLDIR}/extras ] ; then
( cd ${FSLDIR}/extras ; ./build ) ;
MAKEOPTIONS="${MAKEOPTIONS} FSLEXTLIB=${FSLDIR}/extras/lib FSLEXTINC=${FSLDIR}/extras/include" ;
fi
fi
# Determine which make command to use
MAKE=none
if [ X"`make --version 2>&1 | grep -i gnu`"X != XX ] ; then
MAKE=make;
else if [ X"`gmake --version 2>&1 | grep -i gnu`"X != XX ] ; then
MAKE=gmake;
fi; fi
if [ ${MAKE} = none ] ; then
echo "Could not find the gnu make utility in path" ;
exit 1 ;
fi
errorprojs="" ; export errorprojs ;
errorinstall="" ; export errorinstall ;
for projname in $PROJECTS; do
if [ -d $FSLDIR/src/$projname ] ; then
echo " " ;
echo " " ;
echo "Making project src/$projname" ;
echo " " ;
cd $FSLDIR/src/$projname ;
${MAKE} distclean ;
if [ -x fslconfig ] ; then
./fslconfig ;
fi
if ${MAKE} -k ${MAKEOPTIONS} ; then
if ${MAKE} install ; then
installok=true;
else
installok=false;
errorinstall="$errorinstall $projname" ; export errorinstall ;
fi
echo " "
echo " ------------------------- "
echo "Successfully made $projname";
if [ $installok = false ] ; then
echo " "
echo "ERROR::Could not install $projname successfully" ;
fi
else
echo " "
echo " ========================= "
echo "ERROR::Could not make $projname successfully" ;
echo " "
echo " "
errorprojs="$errorprojs $projname" ; export errorprojs ;
fi
fi
done
cd $FSLDIR
echo " ";
echo " ";
echo " ";
if [ "X${errorprojs}X" != XX ] ; then
echo "!!ERROR in BUILD!!" ;
echo " Could not make the following projects successfully:" ;
echo " $errorprojs" ;
else
echo "BUILD successfully made all projects" ;
fi
echo " ";
if [ "X${errorinstall}X" != XX ] ; then
echo "!!ERROR in INSTALL!!" ;
echo " Could not fully install the following projects successfully:" ;
echo " $errorinstall" ;
else
echo " ";
fi
echo " ";
echo "${buildmessages}"