e58a9cebbc41ccfa6d1b7d2e8d8dc9b022e1309b
[build-farm.git] / generic.fns
1 per_run_hook
2
3 global_lock
4
5 system=`uname`
6
7 ENVCFLAGS=$CFLAGS
8
9 for compiler in gcc cc icc; do
10
11   # arrgh, "which" gives no err code on solaris
12   path=`which $compiler`
13   if [ -x "$path" ]; then
14
15     if $compiler -v 2>&1 | grep gcc.version > /dev/null; then
16        isgcc=1
17        CFLAGS="$ENVCFLAGS -Wall"
18     else
19        isgcc=0
20        CFLAGS="$ENVCFLAGS"
21     fi
22     CFLAGS_THIS_COMPILER=`eval CFLAGS_$compiler 2>/dev/null`
23     if [ $? = 0 ] ; then
24             CFLAGS="$CFLAGS_THIS_COMPILER $CFLAGS"
25     fi
26     export CFLAGS
27     if [ $compiler = gcc -o $isgcc = 0 ]; then
28       . common.fns
29       test_tree lorikeet-heimdal . $compiler
30
31       # only attempt samba_4_0_test if we have perl
32       if which perl > /dev/null; then
33         # use gmake if available
34         if [ "x$MAKE" = "x" ] && which gmake > /dev/null; then
35                 MAKE=gmake test_tree samba_4_0_test source $compiler
36         else
37                 test_tree samba_4_0_test source $compiler
38         fi        
39       fi
40
41       # only attempt samba-gtk if we have perl and gtk+-2.0
42       if which perl > /dev/null && which pkg-config > /dev/null && pkg-config --exists gtk+-2.0; then
43         test_tree samba-gtk . $compiler
44       fi
45
46       test_tree samba_3_current source $compiler
47       test_tree samba_3_next source $compiler
48       test_tree samba_3_master source $compiler
49
50       # by default build ppp only on SunOS or Linux systems
51       if [ "$system" = Linux -o "$system" = SunOS ]; then
52          test_tree ppp . $compiler
53       fi
54     fi
55   fi
56 done
57
58 # only attempt pidl if we have perl
59 if which perl > /dev/null; then
60   test_tree pidl . cc build test
61 fi
62
63 global_unlock