Skip to content

Commit f98ac77

Browse files
Prepare Doxygen scripts for the deprecation of Make
We now use CMake to build the documentation in the Mbed-TLS development branch. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
1 parent 8408841 commit f98ac77

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

scripts/apidoc_full.sh

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
2527
fi
2628

2729
if 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
3840
fi
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
5565
fi
5666

5767
if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then

scripts/doxygen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if grep -E "(warning|error):" doc.filtered; then
3030
exit 1;
3131
fi
3232

33-
if in_mbedtls_repo; then
33+
if in_mbedtls_repo && in_3_6_branch; then
3434
make apidoc_clean
3535
fi
3636

0 commit comments

Comments
 (0)