mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-06-05 21:15:09 +00:00
Merge pull request #77 from Harry-Ramsey/tf-psa-crypto-out-of-source-development
Add out of source build functions for TF-PSA-Crypto
This commit is contained in:
+19
-1
@@ -165,6 +165,8 @@ pre_initialize_variables () {
|
||||
PSA_CORE_PATH='tf-psa-crypto/core'
|
||||
BUILTIN_SRC_PATH='tf-psa-crypto/drivers/builtin/src'
|
||||
CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/crypto_config_test_driver.h'
|
||||
MBEDTLS_ROOT_DIR="$PWD"
|
||||
TF_PSA_CRYPTO_ROOT_DIR="$PWD/tf-psa-crypto"
|
||||
fi
|
||||
config_files="$CONFIG_H $CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H"
|
||||
else
|
||||
@@ -172,6 +174,8 @@ pre_initialize_variables () {
|
||||
PSA_CORE_PATH='core'
|
||||
BUILTIN_SRC_PATH='drivers/builtin/src'
|
||||
CONFIG_TEST_DRIVER_H='tests/configs/config_test_driver.h'
|
||||
TF_PSA_CRYPTO_ROOT_DIR="$PWD"
|
||||
MBEDTLS_ROOT_DIR=""
|
||||
|
||||
config_files="$CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H"
|
||||
fi
|
||||
@@ -214,7 +218,7 @@ pre_initialize_variables () {
|
||||
: ${OPENSSL_NEXT:="$OPENSSL"}
|
||||
: ${GNUTLS_CLI:="gnutls-cli"}
|
||||
: ${GNUTLS_SERV:="gnutls-serv"}
|
||||
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
|
||||
: ${OUT_OF_SOURCE_DIR:=$PWD/out_of_source_build}
|
||||
: ${ARMC6_BIN_DIR:=/usr/bin}
|
||||
: ${ARM_NONE_EABI_GCC_PREFIX:=arm-none-eabi-}
|
||||
: ${ARM_LINUX_GNUEABI_GCC_PREFIX:=arm-linux-gnueabi-}
|
||||
@@ -400,6 +404,11 @@ cleanup()
|
||||
rm -f programs/test/cmake_package_install/Makefile
|
||||
rm -f programs/test/cmake_package_install/cmake_package_install
|
||||
|
||||
# Remove out of source directory
|
||||
if in_tf_psa_crypto_repo; then
|
||||
rm -rf "$OUT_OF_SOURCE_DIR"
|
||||
fi
|
||||
|
||||
# Restore files that may have been clobbered by the job
|
||||
restore_backed_up_files
|
||||
}
|
||||
@@ -937,6 +946,10 @@ run_component () {
|
||||
"${dd_cmd[@]}"
|
||||
fi
|
||||
|
||||
if in_tf_psa_crypto_repo; then
|
||||
pre_create_tf_psa_crypto_out_of_source_directory
|
||||
fi
|
||||
|
||||
# Run the component in a subshell, with error trapping and output
|
||||
# redirection set up based on the relevant options.
|
||||
if [ $KEEP_GOING -eq 1 ]; then
|
||||
@@ -975,6 +988,11 @@ run_component () {
|
||||
unset current_component
|
||||
}
|
||||
|
||||
pre_create_tf_psa_crypto_out_of_source_directory () {
|
||||
rm -rf "$OUT_OF_SOURCE_DIR"
|
||||
mkdir "$OUT_OF_SOURCE_DIR"
|
||||
}
|
||||
|
||||
################################################################
|
||||
#### Main
|
||||
################################################################
|
||||
|
||||
Reference in New Issue
Block a user