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