ardupilot/Tools/scripts/build_examples.sh
Andrew Tridgell 1ea1d9983d build: don't build examples for apm1 any more
so little APM1 development happening it is not worth it
2014-07-25 21:03:23 +10:00

34 lines
561 B
Bash
Executable File

#!/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
targets="clean apm2"
[ $# -gt 0 ] && {
targets="$*"
}
export PATH=/usr/lib/ccache:$PATH
TESTS=$(find libraries -name 'Makefile' | grep -v FLYMAPLE | xargs -i dirname '{}')
for b in $TESTS; do
echo "TESTING $b"
pushd $b
if [ -r nobuild.txt ]; then
echo "Skipping build of $b"
else
for t in $targets; do
make -j4 $t
done
fi
popd
done
echo "All examples built OK"
exit 0