X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=generic.fns;h=97937a7afb0f61512f25247b2f7a35c341b0f606;hb=ff8e6d7ccaac87d9aeadbc4160eead2df45366b0;hp=8d320556ecf1e0a542e82c72441e7dd83587014b;hpb=2837640be8b063de94656e4cfb3e06846fb5f60d;p=build-farm.git diff --git a/generic.fns b/generic.fns index 8d320556..97937a7a 100644 --- a/generic.fns +++ b/generic.fns @@ -4,31 +4,67 @@ global_lock system=`uname` -for compiler in gcc cc icc; do +ENVCFLAGS=$CFLAGS +cur_compiler_sum="" +last_compiler_sum="" +if [ "x$compilers" = "x" ]; then + compilers="gcc cc icc" +fi + +for compiler in $compilers; do + + echo "working with compiler $compiler" # arrgh, "which" gives no err code on solaris path=`which $compiler` if [ -x "$path" ]; then + # We do not want to build with the same compiler twice + # cc is a symlink to gcc on some systems + cur_compiler_sum="`sum $path | sed 's/ .*//'`" + test x"$cur_compiler_sum" = x"" && { + cur_compiler_sum="$path" + } + test x"$last_compiler_sum" = x"$cur_compiler_sum" && { + continue; + } + last_compiler_sum="$cur_compiler_sum" + if $compiler -v 2>&1 | grep gcc.version > /dev/null; then isgcc=1 - CFLAGS="-Wall" - export CFLAGS + CFLAGS="$ENVCFLAGS -Wall -g" else - CFLAGS="" - export CFLAGS isgcc=0 + CFLAGS="$ENVCFLAGS -g" fi + + CFLAGS_THIS_COMPILER=`eval CFLAGS_$compiler 2>/dev/null` + if [ $? = 0 ] ; then + CFLAGS="$CFLAGS_THIS_COMPILER $CFLAGS" + fi + export CFLAGS + + TDB_NO_FSYNC=1 + export TDB_NO_FSYNC + TDB_NO_FSYNC=0 + export TDB_NO_FSYNC + if [ $compiler = gcc -o $isgcc = 0 ]; then . common.fns test_tree lorikeet-heimdal . $compiler - # only attempt samba4 if we have perl - if which perl > /dev/null; then - test_tree samba4 source $compiler + # only attempt samba-gtk if we have perl and gtk+-2.0 + if which perl > /dev/null && which pkg-config > /dev/null && pkg-config --exists gtk+-2.0; then + test_tree samba-gtk . $compiler fi - test_tree samba_3_0 source $compiler + TDB_NO_FSYNC=1 + export TDB_NO_FSYNC + test_tree samba_current . $compiler + test_tree samba_next . $compiler + test_tree samba_master . $compiler + TDB_NO_FSYNC=0 + export TDB_NO_FSYNC # by default build ppp only on SunOS or Linux systems if [ "$system" = Linux -o "$system" = SunOS ]; then @@ -36,11 +72,12 @@ for compiler in gcc cc icc; do fi fi fi -done -# only attempt pidl if we have perl -if which perl > /dev/null; then - test_tree pidl source cc build install test -fi + # only attempt pidl if we have perl + if which perl > /dev/null; then + test_tree pidl . cc + fi + +done global_unlock