1#!/bin/sh
2
3# Make sure the doxygen documentation builds without warnings
4
5# Abort on errors (and uninitiliased variables)
6set -eu
7
8if [ -d library -a -d include -a -d tests ]; then :; else
9    echo "Must be run from mbed TLS root" >&2
10    exit 1
11fi
12
13if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else
14    cat doc.err
15    echo "FAIL" >&2
16    exit 1;
17fi
18
19cat doc.out doc.err | \
20    grep -v "warning: ignoring unsupported tag" \
21    > doc.filtered
22
23if egrep "(warning|error):" doc.filtered; then
24    echo "FAIL" >&2
25    exit 1;
26fi
27
28make apidoc_clean
29rm -f doc.out doc.err doc.filtered
30