@@ -22,6 +22,8 @@ if in_mbedtls_repo; then
2222 if ! in_3_6_branch; then
2323 CRYPTO_CONFIG_H=' tf-psa-crypto/include/psa/crypto_config.h'
2424 fi
25+ CONFIG_BAK=${CONFIG_H} .bak
26+ cp -p $CONFIG_H $CONFIG_BAK
2527fi
2628
2729if in_tf_psa_crypto_repo; then
@@ -37,21 +39,29 @@ if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then
3739 cp -p $CRYPTO_CONFIG_H $CRYPTO_CONFIG_BAK
3840fi
3941
40- if in_mbedtls_repo; then
41- CONFIG_BAK=${CONFIG_H} .bak
42- cp -p $CONFIG_H $CONFIG_BAK
42+ if in_mbedtls_repo && in_3_6_branch; then
4343 scripts/config.py realfull
4444 make apidoc
45- mv $CONFIG_BAK $CONFIG_H
46- elif in_tf_psa_crypto_repo; then
45+ else
4746 scripts/config.py realfull
48- TF_PSA_CRYPTO_ROOT_DIR =$PWD
47+ ROOT_DIR =$PWD
4948 rm -rf doxygen/build-apidoc-full
5049 mkdir doxygen/build-apidoc-full
5150 cd doxygen/build-apidoc-full
52- cmake -DCMAKE_BUILD_TYPE:String=Check -DGEN_FILES=ON $TF_PSA_CRYPTO_ROOT_DIR
53- make tfpsacrypto-apidoc
54- cd $TF_PSA_CRYPTO_ROOT_DIR
51+ cmake -DCMAKE_BUILD_TYPE:String=Check -DGEN_FILES=ON $ROOT_DIR
52+ if in_mbedtls_repo; then
53+ make mbedtls-apidoc
54+ else
55+ make tfpsacrypto-apidoc
56+ fi
57+ cd $ROOT_DIR
58+ # The documentation is built in the source tree thus we can delete the
59+ # build tree.
60+ rm -rf doxygen/build-apidoc-full
61+ fi
62+
63+ if in_mbedtls_repo; then
64+ mv $CONFIG_BAK $CONFIG_H
5565fi
5666
5767if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then
0 commit comments