| 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 | 
| 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. | 
| Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 19 |  | 
|  | 20 | # Abort on errors (and uninitiliased variables) | 
|  | 21 | set -eu | 
|  | 22 |  | 
|  | 23 | if [ -d library -a -d include -a -d tests ]; then :; else | 
|  | 24 | echo "Must be run from mbed TLS root" >&2 | 
|  | 25 | exit 1 | 
|  | 26 | fi | 
|  | 27 |  | 
| Manuel Pégourié-Gonnard | d091ed1 | 2016-01-12 14:17:52 +0000 | [diff] [blame] | 28 | 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] | 29 | cat doc.err | 
|  | 30 | echo "FAIL" >&2 | 
|  | 31 | exit 1; | 
|  | 32 | fi | 
|  | 33 |  | 
| Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 34 | cat doc.out doc.err | \ | 
|  | 35 | grep -v "warning: ignoring unsupported tag" \ | 
|  | 36 | > doc.filtered | 
|  | 37 |  | 
| Manuel Pégourié-Gonnard | d091ed1 | 2016-01-12 14:17:52 +0000 | [diff] [blame] | 38 | if egrep "(warning|error):" doc.filtered; then | 
| Manuel Pégourié-Gonnard | 1d552e7 | 2016-01-04 16:49:09 +0100 | [diff] [blame] | 39 | echo "FAIL" >&2 | 
|  | 40 | exit 1; | 
|  | 41 | fi | 
|  | 42 |  | 
|  | 43 | make apidoc_clean | 
| Manuel Pégourié-Gonnard | de7ae7b | 2016-01-08 16:47:33 +0100 | [diff] [blame] | 44 | rm -f doc.out doc.err doc.filtered |