blob: 7d051ed1ebaec448bb315e7292de336f78fcf205 [file] [log] [blame]
Minos Galanakis2c824b42025-03-20 09:28:45 +00001#!/bin/sh
2
3# Make sure the doxygen documentation builds without warnings
4#
5# Copyright The Mbed TLS Contributors
6# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
7
8# Abort on errors (and uninitialised variables)
9set -eu
10
11. $(dirname "$0")/project_detection.sh
12
13if in_mbedtls_repo || in_tf_psa_crypto_repo; then :; else
14 echo "Must be run from Mbed TLS root or TF-PSA-Crypto root" >&2
15 exit 1
16fi
17
18if $(dirname "$0")/apidoc_full.sh > doc.out 2>doc.err; then :; else
19 cat doc.err
20 echo "FAIL" >&2
21 exit 1;
22fi
23
24cat doc.out doc.err | \
25 grep -v "warning: ignoring unsupported tag" \
26 > doc.filtered
27
28if grep -E "(warning|error):" doc.filtered; then
29 echo "FAIL" >&2
30 exit 1;
31fi
32
33if in_mbedtls_repo; then
34 make apidoc_clean
35fi
36
37rm -f doc.out doc.err doc.filtered