diff options
author | midipix <writeonce@midipix.org> | 2020-01-06 14:41:16 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-01-06 22:22:18 +0000 |
commit | 62890d7521f7a8ebbe33f7928e965324351b8d78 (patch) | |
tree | d87074ded3ebedf97b835520ed62cb623a3ed3fb /sofort | |
parent | cf54845999615a6da4ec828ace9177c4868f3954 (diff) | |
download | sbpython3-62890d7521f7a8ebbe33f7928e965324351b8d78.tar.bz2 sbpython3-62890d7521f7a8ebbe33f7928e965324351b8d78.tar.xz |
build system: cfgtest_type_size(): config.log integration.
Diffstat (limited to 'sofort')
-rw-r--r-- | sofort/cfgtest/cfgtest.sh | 28 |
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 } |