X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=generic.fns;h=25a6b2e09a738d2d40f38d3a644896d3ce56e4fb;hb=7a1ca19d62065d21d84d4c4cdae10412dbb03540;hp=018ee5643e38c2c4688ad35b22ca00458bc57631;hpb=d06106c17a6ccada854faa687af6c789693b06ca;p=build-farm.git diff --git a/generic.fns b/generic.fns index 018ee564..25a6b2e0 100644 --- a/generic.fns +++ b/generic.fns @@ -4,36 +4,68 @@ global_lock system=`uname` -for compiler in gcc cc icc; do +ENVCFLAGS=$CFLAGS +cur_compiler_sum="" +last_compiler_sum="" - ENVCFLAGS=$CFLAGS +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="$ENVCFLAGS -Wall" + CFLAGS="$ENVCFLAGS -Wall -g" else isgcc=0 - CFLAGS="$ENVCFLAGS" + 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 + test_tree samba_4_0_test . $compiler + TDB_NO_FSYNC=0 + export TDB_NO_FSYNC + if [ $compiler = gcc -o $isgcc = 0 ]; then . common.fns test_tree lorikeet-heimdal . $compiler - # only attempt samba_4_0_test if we have perl - if which perl > /dev/null; then - test_tree samba_4_0_test source $compiler - fi - # 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_X_test source $compiler + TDB_NO_FSYNC=1 + export TDB_NO_FSYNC + test_tree samba_3_current source3 $compiler + test_tree samba_3_next source3 $compiler + test_tree samba_3_master source3 $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 @@ -45,7 +77,7 @@ done # only attempt pidl if we have perl if which perl > /dev/null; then - test_tree pidl . cc build test + test_tree pidl . cc fi global_unlock