summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-10-03 12:24:26 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-10-03 12:24:26 +0000
commit3827bea20ed579fbbba4bafc6de30270ae200ea5 (patch)
tree5a10845730c235ba8173042e5102053ef32361d3 /tools
parent42d30f4623a5d19630fa4ad5811aeedf600844bb (diff)
downloadmpc-3827bea20ed579fbbba4bafc6de30270ae200ea5.tar.gz
pipol/scripts/compile-svn.sh: workaround in order not to split CFLAGS options when passing them to configure.
pipol/nightly/multiopt: randomize MPC tests and other cosmetic changes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@228 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pipol/nightly/multiopt17
-rwxr-xr-xtools/pipol/scripts/compile-svn.sh17
2 files changed, 24 insertions, 10 deletions
diff --git a/tools/pipol/nightly/multiopt b/tools/pipol/nightly/multiopt
index 4ea2f62..5f0d963 100755
--- a/tools/pipol/nightly/multiopt
+++ b/tools/pipol/nightly/multiopt
@@ -25,7 +25,7 @@ local number=${RANDOM:-3}
unset RANDOM_OPT
for ((i=0; i < ${#CONFIGURE_OPTIONS[*]}; i++)); do
if [ $(($((2**i)) & number)) -ne 0 ]; then
- RANDOM_OPT=$RANDOM_OPT" "${CONFIGURE_OPTIONS[$i]};
+ RANDOM_OPT+=" "${CONFIGURE_OPTIONS[$i]};
fi
done
@@ -33,17 +33,17 @@ unset CFLAGS_OPT
CFLAGS_OPTIONS=(\
-O3 \
-ansi \
- "-std=c99 -D_XOPEN_SOURCE=500" \
- "-D_FORTIFY_SOURCE=2" \
+ "-std=c99 -D _XOPEN_SOURCE=500" \
+ "-D _FORTIFY_SOURCE=2" \
-fno-common)
for ((i=0; i < ${#CFLAGS_OPTIONS[*]}; i++)); do
j=$i+${#CONFIGURE_OPTIONS[*]}
if [ $(($((2**j)) & number)) -ne 0 ]; then
- CFLAGS_OPT=$CFLAGS_OPT" "${CFLAGS_OPTIONS[$i]}
+ CFLAGS_OPT+=${CFLAGS_OPTIONS[$i]}" "
fi
done
if [ -n "$CFLAGS_OPT" ]; then
- RANDOM_OPT=$RANDOM_OPT" ""CFLAGS=\"$CFLAGS_OPT\" "
+ RANDOM_OPT+=" CFLAGS=\"$CFLAGS_OPT\""
fi
}
@@ -96,11 +96,13 @@ function clean_compile_dir()
#PIPOL esn i386-linux-redhatEL-5.0.dd.gz none 02:00 --silent --user
#PIPOL esn ia64-linux-redhatEL-5.0.dd none 02:00 --silent --user
-
###
### Following commands are executed on each and all deployed images
###
+# this understood by mpc and mpfr compilation processes
+export GMP_CHECK_RANDOMIZE=1
+
#
# Get mpc trunk and compile it
#
@@ -117,7 +119,6 @@ unset REVISION
log $SCRIPTS_DIR/get-svn.sh mpfr/trunk mpfr-trunk
get_revision $PIPOL_WDIR/mpfr-trunk
REVISION="mpfr(r$REVISION)"
-export GMP_CHECK_RANDOMIZE=1
export MPFR_CHECK_MAX=1
export MPFR_CHECK_ALL=1
log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk
@@ -127,7 +128,7 @@ log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk --enable-assert=full
clean_compile_dir $PIPOL_WDIR/mpfr-trunk
random_opt
-log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk $RANDOM_OPT
+log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk $RANDOM_OPT
#
# Return value is 0 if no script failed
diff --git a/tools/pipol/scripts/compile-svn.sh b/tools/pipol/scripts/compile-svn.sh
index ddabf39..5cbac09 100755
--- a/tools/pipol/scripts/compile-svn.sh
+++ b/tools/pipol/scripts/compile-svn.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-if [ $# -lt 1 ]; then
+if [[ $# -lt 1 ]]; then
echo Usage: `basename $0` dir [options];
echo -n "Configure, compile, and check sources in \$PIPOL_WDIR/dir "
echo passing options to the compiler;
@@ -10,5 +10,18 @@ if [ $# -lt 1 ]; then
fi
cd $PIPOL_WDIR/$1
+if [[ ! -f configure ]]; then
+ autoreconf -i || exit 1;
+fi
+
shift
-autoreconf -i && ./configure $* && make && make check;
+if grep -q "CFLAGS=" <<<"$@"; then
+# "$@" would also split the CFLAGS options so we have to separate configure
+# and CFLAGS options manually
+ CONFIGURE_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/\1\3/p' <<<"$@"`
+ CFLAGS_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/CFLAGS=\2/p' <<<"$@"`
+ ./configure $CONFIGURE_OPTIONS "$CFLAGS_OPTIONS" && make && make check;
+
+else
+ ./configure "$@" && make && make check;
+fi \ No newline at end of file