summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
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