mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-25 09:02:48 +00:00
Include existing Makefile
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
9a32632577
commit
cc88ccdda1
@ -3950,12 +3950,16 @@ build_test_config_combos() {
|
|||||||
# This ensures that we have any include paths, macro definitions, etc
|
# This ensures that we have any include paths, macro definitions, etc
|
||||||
# that may be applied by make.
|
# that may be applied by make.
|
||||||
# Add -fsyntax-only as we only want a syntax check and don't need to generate a file.
|
# Add -fsyntax-only as we only want a syntax check and don't need to generate a file.
|
||||||
compile_cmd=$(make -B -n ${file} CC=clang CFLAGS="${warning_flags} -fsyntax-only" | egrep "^clang")
|
compile_cmd="clang \$(LOCAL_CFLAGS) ${warning_flags} -fsyntax-only -c"
|
||||||
|
|
||||||
makefile=$(mktemp)
|
makefile=$(TMPDIR=. mktemp)
|
||||||
deps=""
|
deps=""
|
||||||
|
|
||||||
len=${#options[@]}
|
len=${#options[@]}
|
||||||
|
source_file=${file%.o}.c
|
||||||
|
|
||||||
|
targets=0
|
||||||
|
echo 'include Makefile' >${makefile}
|
||||||
|
|
||||||
for ((i = 0; i < $((2**${len})); i++)); do
|
for ((i = 0; i < $((2**${len})); i++)); do
|
||||||
# generate each of 2^n combinations of options
|
# generate each of 2^n combinations of options
|
||||||
@ -3973,17 +3977,18 @@ build_test_config_combos() {
|
|||||||
# if combination is not known to be invalid, add it to the makefile
|
# if combination is not known to be invalid, add it to the makefile
|
||||||
if [[ -z $validate_options ]] || [[ $($validate_options "${clang_args}") == "" ]] ; then
|
if [[ -z $validate_options ]] || [[ $($validate_options "${clang_args}") == "" ]] ; then
|
||||||
cmd="${compile_cmd} ${clang_args}"
|
cmd="${compile_cmd} ${clang_args}"
|
||||||
echo "${target}:" >> ${makefile}
|
echo "${target}: ${source_file}; $cmd ${source_file}" >> ${makefile}
|
||||||
echo -e "\t$cmd" >> ${makefile}
|
|
||||||
|
|
||||||
deps="${deps} ${target}"
|
deps="${deps} ${target}"
|
||||||
|
((++targets))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "all: ${deps}" >> ${makefile}
|
echo "build_test_config_combos: ${deps}" >> ${makefile}
|
||||||
|
|
||||||
# execute all of the commands via Make (probably in parallel)
|
# execute all of the commands via Make (probably in parallel)
|
||||||
make -s -f ${makefile} all
|
make -s -f ${makefile} build_test_config_combos
|
||||||
|
echo "$targets targets checked"
|
||||||
|
|
||||||
# clean up the temporary makefile
|
# clean up the temporary makefile
|
||||||
rm ${makefile}
|
rm ${makefile}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user