blob: 4fb8b7f1b10b6323b0df63e05a54d7f784ee080b [file] [log] [blame]
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +01001#!/bin/sh
2
3# Make sure the doxygen documentation builds without warnings
Bence Szépkúti700ee442020-05-26 00:33:31 +02004#
5# Copyright (C) 2016, Arm Limited, All Rights Reserved
6#
7# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +01008
9# Abort on errors (and uninitiliased variables)
10set -eu
11
12if [ -d library -a -d include -a -d tests ]; then :; else
13 echo "Must be run from mbed TLS root" >&2
14 exit 1
15fi
16
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000017if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010018 cat doc.err
19 echo "FAIL" >&2
20 exit 1;
21fi
22
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010023cat doc.out doc.err | \
24 grep -v "warning: ignoring unsupported tag" \
25 > doc.filtered
26
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000027if egrep "(warning|error):" doc.filtered; then
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010028 echo "FAIL" >&2
29 exit 1;
30fi
31
32make apidoc_clean
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010033rm -f doc.out doc.err doc.filtered