apidoc_full.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 OR GPL-2.0-or-later
  11. #
  12. # This file is provided under the Apache License 2.0, or the
  13. # GNU General Public License v2.0 or later.
  14. #
  15. # **********
  16. # Apache License 2.0:
  17. #
  18. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  19. # not use this file except in compliance with the License.
  20. # You may obtain a copy of the License at
  21. #
  22. # http://www.apache.org/licenses/LICENSE-2.0
  23. #
  24. # Unless required by applicable law or agreed to in writing, software
  25. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  26. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27. # See the License for the specific language governing permissions and
  28. # limitations under the License.
  29. #
  30. # **********
  31. #
  32. # **********
  33. # GNU General Public License v2.0 or later:
  34. #
  35. # This program is free software; you can redistribute it and/or modify
  36. # it under the terms of the GNU General Public License as published by
  37. # the Free Software Foundation; either version 2 of the License, or
  38. # (at your option) any later version.
  39. #
  40. # This program is distributed in the hope that it will be useful,
  41. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  42. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  43. # GNU General Public License for more details.
  44. #
  45. # You should have received a copy of the GNU General Public License along
  46. # with this program; if not, write to the Free Software Foundation, Inc.,
  47. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  48. #
  49. # **********
  50. set -eu
  51. CONFIG_H='include/mbedtls/config.h'
  52. if [ -r $CONFIG_H ]; then :; else
  53. echo "$CONFIG_H not found" >&2
  54. exit 1
  55. fi
  56. CONFIG_BAK=${CONFIG_H}.bak
  57. cp -p $CONFIG_H $CONFIG_BAK
  58. scripts/config.pl realfull
  59. make apidoc
  60. mv $CONFIG_BAK $CONFIG_H