diff options
author | midipix <writeonce@midipix.org> | 2020-01-06 14:41:16 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-01-06 22:22:09 +0000 |
commit | 1d55c8cada4dfb05a97e7ab5600597c56d0a2226 (patch) | |
tree | 22d59eec015d8976e48ca58e2cd0726db83dd936 /sofort | |
parent | 53fd565706c75eb5e06d15f51fb2fb9c4a36392c (diff) | |
download | sbpython2-1d55c8cada4dfb05a97e7ab5600597c56d0a2226.tar.bz2 sbpython2-1d55c8cada4dfb05a97e7ab5600597c56d0a2226.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 } |