mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-29 05:55:48 +03:00
The pkgconfig specification for libcunit1-dev version 2.1-2 is horribly broken. build.sh (invoked by the travis CI system, see .travis.yml) now runs a new script fix-cunit.sh when TESTS is set to 'yes'.
32 lines
835 B
Bash
Executable File
32 lines
835 B
Bash
Executable File
#! /bin/sh
|
|
|
|
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
|
|
WITH_TESTS="`scripts/fix-cunit.sh` --enable-tests"
|
|
fi
|
|
|
|
config() {
|
|
echo "./configure $*"
|
|
./configure $*
|
|
}
|
|
|
|
case "${PLATFORM}" in
|
|
contiki) config "--disable-tests --disable-documentation --disable-examples" && \
|
|
make -C examples/contiki
|
|
;;
|
|
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
|
|
make -C examples/lwip lwip lwip-contrib
|
|
make -C examples/lwip LDLIBS=`grep ac_cv_search_clock_gettime=- config.log|cut -d= -f2`
|
|
;;
|
|
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
|