summaryrefslogtreecommitdiffhomepage
path: root/sofort/cfgtest
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-06 14:41:16 +0000
committermidipix <writeonce@midipix.org>2020-01-06 22:21:55 +0000
commit01f634d448b2bff64faf096c8b9f6050ae045f73 (patch)
tree60d4b6a41a972ed1455f7c16f962da7799908b3c /sofort/cfgtest
parent49c5c68d13cd014fd55894080880368c193e421a (diff)
downloadsofort-01f634d448b2bff64faf096c8b9f6050ae045f73.tar.bz2
sofort-01f634d448b2bff64faf096c8b9f6050ae045f73.tar.xz
build system: cfgtest_type_size(): config.log integration.
Diffstat (limited to 'sofort/cfgtest')
-rw-r--r--sofort/cfgtest/cfgtest.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index 56ba359..4cd9e08 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -78,6 +78,10 @@ cfgtest_epilog()
printf '\n\ncfgtest: %s is missing or cannot be found.\n' "${1}" >&3
printf '%s\n' '------------------------' >&3
return 1
+ elif [ "${1}" = 'size-of-type' ] && [ "${2}" = '(error)' ]; then
+ printf '\n\ncfgtest: could not determine size of type.\n' >&3
+ printf '%s\n' '------------------------' >&3
+ return 1
elif [ "${2}" = '(error)' ]; then
printf '\n\ncfgtest: %s is not defined or cannot be used.\n' "${1}" >&3
printf '%s\n' '------------------------' >&3
@@ -86,6 +90,21 @@ cfgtest_epilog()
}
+cfgtest_entity_size_prolog()
+{
+ cfgtest_line_dots='.......................'
+ cfgtest_line_dots="${cfgtest_line_dots}${cfgtest_line_dots}"
+ cfgtest_tool_desc=" == checking size of ${mb_cfgtest_cfgtype} type: ${@}"
+ cfgtest_tool_dlen="${#cfgtest_line_dots}"
+
+ printf '\n%s\n' '________________________' >&3
+ printf "cfgtest: checking size of ${mb_cfgtest_cfgtype} type: ${@}\n\n" >&3
+
+ printf "%${cfgtest_tool_dlen}.${cfgtest_tool_dlen}s" \
+ "${cfgtest_tool_desc} ${mb_line_dots}"
+}
+
+
cfgtest_makevar_append()
{
mb_internal_str='+='
@@ -335,6 +354,8 @@ cfgtest_decl_presence()
cfgtest_type_size()
{
+ cfgtest_entity_size_prolog "$@"
+
mb_internal_cflags=''
mb_internal_size=''
mb_internal_test='char x[(sizeof(%s) == %s) ? 1 : -1];'
@@ -362,6 +383,7 @@ cfgtest_type_size()
# unrecognized type, or type size not within range
if [ -z $mb_internal_size ]; then
+ cfgtest_epilog 'size-of-type' '(error)'
return 1
fi
@@ -378,6 +400,12 @@ cfgtest_type_size()
cfgtest_makevar_append "$mb_internal_str"
fi
+ printf 'cfgtest: size of type `%s'"'"' determined to be %s\n' \
+ "${@}" "$mb_internal_size" >&3
+ printf '%s\n' '------------------------' >&3
+
+ cfgtest_epilog 'size-of-type' "$mb_internal_size"
+
return 0
}