Files
libcoap/scripts/build.sh
T
Olaf Bergmann 8bb7ec80e7 scripts/build.sh: bugfix: stay in top directory for non-posix platforms
When TESTS=yes is given, the scripts invokes the test driver from
the top build directory. Platform-specific actions hence must ensure
that they stay in that directory and keep the last exit code.
2016-02-16 12:13:18 +01:00

31 lines
727 B
Bash
Executable File

#! /bin/sh
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
WITH_TESTS=--enable-tests
fi
config() {
echo "./configure $*"
./configure $*
}
case "${PLATFORM}" in
contiki) config "--disable-tests --disable-documentation --disable-examples" && \
make -C examples/contiki V=1 contiki all
;;
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
make -C examples/lwip lwip lwip-contrib all
;;
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && \
make
;;
esac
err=$?
if test $err = 0 -a -n "$WITH_TESTS" ; then
tests/testdriver
err=$?
fi
exit $err