summaryrefslogtreecommitdiff
path: root/.ci/osx-build.sh
blob: bf2c13fa3c1af8ff84446c1b22f1b0e9df220a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

set -o errexit

CFLAGS="-Werror $CFLAGS"
EXTRA_OPTS=""

function configure_ovs()
{
    ./boot.sh && ./configure $*
}

configure_ovs $EXTRA_OPTS $*

if [ "$CC" = "clang" ]; then
    set make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
else
    set make CFLAGS="$CFLAGS $BUILD_ENV"
fi
if ! "$@"; then
    cat config.log
    exit 1
fi
if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
    if ! make distcheck RECHECK=yes; then
        # testsuite.log is necessary for debugging.
        cat */_build/sub/tests/testsuite.log
        exit 1
    fi
fi

exit 0