2012-11-24 06:06:52 -04:00
|
|
|
#!/bin/bash
|
|
|
|
# useful script to test the build of all example code
|
|
|
|
# This helps when doing large merges
|
|
|
|
# Andrew Tridgell, November 2012
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2013-01-13 16:03:16 -04:00
|
|
|
targets="clean apm1 clean apm2"
|
2012-12-18 20:01:14 -04:00
|
|
|
|
|
|
|
[ $# -gt 0 ] && {
|
|
|
|
targets="$*"
|
|
|
|
}
|
|
|
|
|
2012-11-24 06:06:52 -04:00
|
|
|
export PATH=/usr/lib/ccache:$PATH
|
|
|
|
|
2013-09-24 01:27:32 -03:00
|
|
|
TESTS=$(find libraries -name 'Makefile' | grep -v FLYMAPLE | xargs -i dirname '{}')
|
2012-11-24 06:06:52 -04:00
|
|
|
|
|
|
|
for b in $TESTS; do
|
|
|
|
echo "TESTING $b"
|
|
|
|
pushd $b
|
|
|
|
if [ -r nobuild.txt ]; then
|
|
|
|
echo "Skipping build of $b"
|
|
|
|
else
|
2012-12-18 20:02:33 -04:00
|
|
|
for t in $targets; do
|
2013-01-13 16:03:16 -04:00
|
|
|
make -j4 $t
|
2012-12-18 20:02:33 -04:00
|
|
|
done
|
2012-11-24 06:06:52 -04:00
|
|
|
fi
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "All examples built OK"
|
|
|
|
exit 0
|