blob: e3550738c016489c02e52df7ef1f1eed979c7a37 [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#
Bence Szépkúti1e148272020-08-07 13:07:28 +02005# Copyright The Mbed TLS Contributors
Bence Szépkútic7da1fe2020-05-26 01:54:15 +02006# SPDX-License-Identifier: Apache-2.0
7#
8# Licensed under the Apache License, Version 2.0 (the "License"); you may
9# not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010019
20# Abort on errors (and uninitiliased variables)
21set -eu
22
23if [ -d library -a -d include -a -d tests ]; then :; else
24 echo "Must be run from mbed TLS root" >&2
25 exit 1
26fi
27
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000028if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010029 cat doc.err
30 echo "FAIL" >&2
31 exit 1;
32fi
33
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010034cat doc.out doc.err | \
35 grep -v "warning: ignoring unsupported tag" \
36 > doc.filtered
37
Ville Skyttä66edfe42023-01-01 18:19:49 +020038if grep -E "(warning|error):" doc.filtered; then
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010039 echo "FAIL" >&2
40 exit 1;
41fi
42
43make apidoc_clean
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010044rm -f doc.out doc.err doc.filtered