https://svn.lrde.epita.fr/svn/lrde-tools/trunk/build-farm
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Start to use CONFIG_SITE.
* buildfarm_worker/build_test.fns (build_tool): New function.
(c_compiler, cxx_compiler): New functions.
Use them to simplify...
(action_system): ...this action.
(CONFIG_SITE): Set this environment variable to
"$bf_root/config.fns".
* buildfarm_worker/config.fns: New.
* buildfarm_worker/antalya.fns, buildfarm_worker/pau.fns: Don't
set host_config nor DISTCHECK_CONFIGURE_FLAGS, since CONFIG_SITE
handles configuration settings.
antalya.fns | 6 ------
build_test.fns | 33 ++++++++++++++++++++++-----------
config.fns | 46 ++++++++++++++++++++++++++++++++++++++++++++++
pau.fns | 3 ---
4 files changed, 68 insertions(+), 20 deletions(-)
Index: buildfarm_worker/build_test.fns
--- buildfarm_worker/build_test.fns (revision 399)
+++ buildfarm_worker/build_test.fns (working copy)
@@ -36,6 +36,25 @@
done
}
+# BUILD_TOOL ENVVAR DEFAULT
+# -------------------------
+# Check if an environment variable named ENVVAR exists, and print it if so.
+# Otherwise, print DEFAULT.
+build_tool()
+{
+ envvar="$(printenv $1)"
+ default="$2"
+ if test -n "$envvar"; then
+ echo $envvar
+ else
+ echo $default
+ fi
+}
+
+# C and C++ compilers used.
+c_compiler() { echo $(build_tool CC cc; }
+cxx_compiler() { echo $(build_tool CXX c++; }
+
#############################
# build a signature of a tree, used to see if we
@@ -308,18 +327,8 @@
. $bf_root/system.fns
echo
- # C and C++ compilers used.
- c_compiler="$CC"
- if test -z "$c_compiler"; then
- c_compiler=cc
- fi
- cxx_compiler="$CXX"
- if test -z "$cxx_compiler"; then
- cxx_compiler=c++
- fi
-
# print some programs version. Too late, it was asked.
- SHOW_VERSION="$c_compiler --version:$cxx_compiler --version:autoconf
--version:automake --version:make --version:libtool --version:ld
--version:$PRG_VERSION"
+ SHOW_VERSION="$(c_compiler) --version:$(cxx_compiler) --version:autoconf
--version:automake --version:make --version:libtool --version:ld
--version:$PRG_VERSION"
old_IFS=$IFS
IFS=":"
@@ -668,6 +677,8 @@
build_root=`pwd`/build
prefix_root=`pwd`/prefix
bf_root=`pwd`
+# Configuration site defaults.
+export CONFIG_SITE="$bf_root/config.fns"
$RSYNC -q -az $RSYNC_HOST::buildfarm_worker/*.c .
Index: buildfarm_worker/config.fns
--- buildfarm_worker/config.fns (revision 0)
+++ buildfarm_worker/config.fns (revision 0)
@@ -0,0 +1,46 @@
+# Configuration site defaults. -*- shell-script -*-
+
+echo "Loading config.site for $PACKAGE_TARNAME on $host"
+echo "(srcdir: $srcdir)"
+echo
+
+package=$PACKAGE_TARNAME
+version=$PACKAGE_VERSION
+
+echo "----------------------------------------------------------------------"
+echo "config.site: $package $version"
+echo "----------------------------------------------------------------------"
+
+
+case $package:$version in
+
+ # ------- #
+ # Tiger. #
+ # ------- #
+
+ tc:*)
+ # Help configure to find the Boost libraries...
+ # ...on Mac OS X (in Fink).
+ if test -f /sw/include/boost-1_32/boost/config.hpp; then
+ with_boost=/sw/include/boost-1_32
+ # ...on Cygwin.
+ elif test -f /usr/include/boost-1_33/boost/config.hpp; then
+ with_boost=/usr/include/boost-1_33
+ fi
+
+ # Enable shared libraries and TCSH.
+ : ${enable_shared=yes}
+ ;;
+
+ # ------- #
+ # Olena. #
+ # ------- #
+
+ olena:0.10*)
+ # Pacify Apple's g++.
+ if $(cxx_compiler) --version | grep Apple >/dev/null; then
+ CXXFLAGS=-Wno-long-double
+ fi
+ ;;
+
+esac
Index: buildfarm_worker/pau.fns
--- buildfarm_worker/pau.fns (revision 399)
+++ buildfarm_worker/pau.fns (working copy)
@@ -21,10 +21,7 @@
test_tree nolimips
test_tree monoburg
test_tree clspr
-# Boost headers.
-host_config="--with-boost=/usr/include/boost-1_33"
test_tree tc configure build distcheck
-host_config=""
test_tree vaucanson
Index: buildfarm_worker/antalya.fns
--- buildfarm_worker/antalya.fns (revision 399)
+++ buildfarm_worker/antalya.fns (working copy)
@@ -48,13 +48,7 @@
test_tree monoburg
test_tree clspr
-# FIXME: Is this the best way to set DISTCHECK_CONFIGURE_FLAGS?
-# Anyway, we want to use CONFIG_SITE.
-host_config="--with-boost=/sw/include"
-export DISTCHECK_CONFIGURE_FLAGS="$host_config"
test_tree tc configure build distcheck
-unset DISTCHECK_CONFIGURE_FLAGS
-host_config=""
# ----------- #