blob: c7688ad081fe95d1d6134e2e3d51eb139fb58afb [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útib7246ad2020-05-26 00:33:31 +02004#
5# Copyright (C) 2016, Arm Limited, All Rights Reserved
Bence Szépkúti4e9f7122020-06-05 13:02:18 +02006# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
7#
8# This file is provided under the Apache License 2.0, or the
9# GNU General Public License v2.0 or later.
10#
11# **********
12# Apache License 2.0:
Bence Szépkúti09b4f192020-05-26 01:54:15 +020013#
14# Licensed under the Apache License, Version 2.0 (the "License"); you may
15# not use this file except in compliance with the License.
16# You may obtain a copy of the License at
17#
18# http://www.apache.org/licenses/LICENSE-2.0
19#
20# Unless required by applicable law or agreed to in writing, software
21# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23# See the License for the specific language governing permissions and
24# limitations under the License.
Bence Szépkútib7246ad2020-05-26 00:33:31 +020025#
Bence Szépkúti4e9f7122020-06-05 13:02:18 +020026# **********
27#
28# **********
29# GNU General Public License v2.0 or later:
30#
31# This program is free software; you can redistribute it and/or modify
32# it under the terms of the GNU General Public License as published by
33# the Free Software Foundation; either version 2 of the License, or
34# (at your option) any later version.
35#
36# This program is distributed in the hope that it will be useful,
37# but WITHOUT ANY WARRANTY; without even the implied warranty of
38# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39# GNU General Public License for more details.
40#
41# You should have received a copy of the GNU General Public License along
42# with this program; if not, write to the Free Software Foundation, Inc.,
43# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
44#
45# **********
46#
Bence Szépkútib7246ad2020-05-26 00:33:31 +020047# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010048
49# Abort on errors (and uninitiliased variables)
50set -eu
51
52if [ -d library -a -d include -a -d tests ]; then :; else
53 echo "Must be run from mbed TLS root" >&2
54 exit 1
55fi
56
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000057if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010058 cat doc.err
59 echo "FAIL" >&2
60 exit 1;
61fi
62
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010063cat doc.out doc.err | \
64 grep -v "warning: ignoring unsupported tag" \
65 > doc.filtered
66
Manuel Pégourié-Gonnardd091ed12016-01-12 14:17:52 +000067if egrep "(warning|error):" doc.filtered; then
Manuel Pégourié-Gonnard1d552e72016-01-04 16:49:09 +010068 echo "FAIL" >&2
69 exit 1;
70fi
71
72make apidoc_clean
Manuel Pégourié-Gonnardde7ae7b2016-01-08 16:47:33 +010073rm -f doc.out doc.err doc.filtered