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 | # |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 5 | # Copyright The Mbed TLS Contributors |
Dave Rodgman | 16799db | 2023-11-02 19:47:20 +0000 | [diff] [blame] | 6 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 7 | |
Jan Bruckner | 1aabe5c | 2023-02-06 12:54:53 +0100 | [diff] [blame] | 8 | # Abort on errors (and uninitialised variables) |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 9 | set -eu |
| 10 | |
| 11 | if [ -d library -a -d include -a -d tests ]; then :; else |
Gilles Peskine | e820c0a | 2023-08-03 17:45:20 +0200 | [diff] [blame] | 12 | echo "Must be run from Mbed TLS root" >&2 |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 13 | exit 1 |
| 14 | fi |
| 15 | |
Manuel Pégourié-Gonnard | d091ed1 | 2016-01-12 14:17:52 +0000 | [diff] [blame] | 16 | 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] | 17 | cat doc.err |
| 18 | echo "FAIL" >&2 |
| 19 | exit 1; |
| 20 | fi |
| 21 | |
Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 22 | cat doc.out doc.err | \ |
| 23 | grep -v "warning: ignoring unsupported tag" \ |
| 24 | > doc.filtered |
| 25 | |
Ville Skyttä | 66edfe4 | 2023-01-01 18:19:49 +0200 | [diff] [blame] | 26 | if grep -E "(warning|error):" doc.filtered; then |
Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 27 | echo "FAIL" >&2 |
| 28 | exit 1; |
| 29 | fi |
| 30 | |
| 31 | make apidoc_clean |
Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 32 | rm -f doc.out doc.err doc.filtered |