Files
libcoap/scripts/build.sh
T
Olaf Bergmann 641b8ed196 scripts/build.sh: Added build script to facilitate CI
The build script invokes configure and make with different
parameters depending on the environment variables PLATFORM
and TESTS. PLATFORM currently must be one of 'posix', 'contiki', or
'lwip'. If TESTS is set to 'yes' or 'true', the option --enable-tests
will be passed to configure and tests/testdriver will be invoked
after configuration and make.
2016-02-15 16:04:59 +01:00

26 lines
679 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" && \
(cd examples/contiki && make V=1 contiki all)
;;
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
(cd examples/lwip && make lwip lwip-contrib all)
;;
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && make
;;
esac
if test -n "$WITH_TESTS" ; then
tests/testdriver
fi