apidoc_full.sh 1.2 KB

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