blob: ed8a9ef2a658284b09a5679fbe8e1f94faca7805 [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
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.
Bence Szépkúti700ee442020-05-26 00:33:31 +020019#
20# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010021
22# Abort on errors (and uninitiliased variables)
23set -eu
24
25if [ -d library -a -d include -a -d tests ]; then :; else
26 echo "Must be run from mbed TLS root" >&2
27 exit 1
28fi
29
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000030if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010031 cat doc.err
32 echo "FAIL" >&2
33 exit 1;
34fi
35
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010036cat doc.out doc.err | \
37 grep -v "warning: ignoring unsupported tag" \
38 > doc.filtered
39
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000040if egrep "(warning|error):" doc.filtered; then
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010041 echo "FAIL" >&2
42 exit 1;
43fi
44
45make apidoc_clean
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010046rm -f doc.out doc.err doc.filtered