aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/test-build.sh
blob: ce4aab50f8a08472cb451df9497298262309c7d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh

MIXED_COMPILERS="gcc /usr/gcc/bin/gcc clang"
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 () {
	for j in "" --disable-mpfr
	do
		./configure $j CC="$1"
		compile "$1" "$j"
	done
	make distclean
}

(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