aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/test-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/test-build.sh')
-rwxr-xr-xhelpers/test-build.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/helpers/test-build.sh b/helpers/test-build.sh
new file mode 100755
index 00000000..3ed20ec1
--- /dev/null
+++ b/helpers/test-build.sh
@@ -0,0 +1,52 @@
+#! /bin/bash
+
+MIXED_COMPILERS=${MIXED_COMPILERS:-gcc /usr/gcc/bin/gcc clang}
+OTHER_COMPILERS=${OTHER_COMPILERS:-tcc pcc}
+
+rm -f compile-results.txt
+
+compile () {
+ make -k
+ if make check
+ then
+ echo success: $1 $2 >> compile-results.txt
+ else
+ echo failure: $1 $2 >> compile-results.txt
+ fi
+}
+
+configure_and_compile () {
+ if type -p $1 >> compile-results.txt 2>&1
+ then
+ for j in "" --disable-mpfr
+ do
+ ./configure $j CC="$1"
+ compile "$1" "$j"
+ make distclean
+ done
+ fi
+}
+
+(make distclean)
+
+for i in $OTHER_COMPILERS $MIXED_COMPILERS
+do
+ configure_and_compile $i
+done
+
+for i in $MIXED_COMPILERS
+do
+ configure_and_compile "$i -m32"
+done
+
+echo
+echo ==========================================
+echo
+case $(grep failure compile-results.txt | wc -l) in
+0) echo No failures!
+ # rm compile-results.txt
+ ;;
+*) echo The following combinations failed:
+ grep failure compile-results.txt
+ ;;
+esac