1#!/bin/sh
2
3# Generate doxygen documentation with a full mbedtls_config.h (this ensures that every
4# available flag is documented, and avoids warnings about documentation
5# without a corresponding #define).
6#
7# /!\ This must not be a Makefile target, as it would create a race condition
8# when multiple targets are invoked in the same parallel build.
9#
10# Copyright The Mbed TLS Contributors
11# SPDX-License-Identifier: Apache-2.0
12#
13# Licensed under the Apache License, Version 2.0 (the "License"); you may
14# not use this file except in compliance with the License.
15# You may obtain a copy of the License at
16#
17# http://www.apache.org/licenses/LICENSE-2.0
18#
19# Unless required by applicable law or agreed to in writing, software
20# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
21# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22# See the License for the specific language governing permissions and
23# limitations under the License.
24
25set -eu
26
27CONFIG_H='include/mbedtls/mbedtls_config.h'
28
29if [ -r $CONFIG_H ]; then :; else
30    echo "$CONFIG_H not found" >&2
31    exit 1
32fi
33
34CONFIG_BAK=${CONFIG_H}.bak
35cp -p $CONFIG_H $CONFIG_BAK
36
37scripts/config.py realfull
38make apidoc
39
40mv $CONFIG_BAK $CONFIG_H
41