Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Make sure the doxygen documentation builds without warnings |
Bence Szépkúti | 700ee44 | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 4 | # |
| 5 | # Copyright (C) 2016, Arm Limited, All Rights Reserved |
Bence Szépkúti | c7da1fe | 2020-05-26 01:54:15 +0200 | [diff] [blame^] | 6 | # 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úti | 700ee44 | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 19 | # |
| 20 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 21 | |
| 22 | # Abort on errors (and uninitiliased variables) |
| 23 | set -eu |
| 24 | |
| 25 | if [ -d library -a -d include -a -d tests ]; then :; else |
| 26 | echo "Must be run from mbed TLS root" >&2 |
| 27 | exit 1 |
| 28 | fi |
| 29 | |
Manuel Pégourié-Gonnard | d091ed1 | 2016-01-12 14:17:52 +0000 | [diff] [blame] | 30 | if scripts/apidoc_full.sh > doc.out 2>doc.err; then :; else |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 31 | cat doc.err |
| 32 | echo "FAIL" >&2 |
| 33 | exit 1; |
| 34 | fi |
| 35 | |
Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 36 | cat doc.out doc.err | \ |
| 37 | grep -v "warning: ignoring unsupported tag" \ |
| 38 | > doc.filtered |
| 39 | |
Manuel Pégourié-Gonnard | d091ed1 | 2016-01-12 14:17:52 +0000 | [diff] [blame] | 40 | if egrep "(warning|error):" doc.filtered; then |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 41 | echo "FAIL" >&2 |
| 42 | exit 1; |
| 43 | fi |
| 44 | |
| 45 | make apidoc_clean |
Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 46 | rm -f doc.out doc.err doc.filtered |