diff options
author | midipix <writeonce@midipix.org> | 2020-01-06 14:41:16 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-01-06 22:21:32 +0000 |
commit | 43a058d44fdd807188d2334aabad3ab29c451a54 (patch) | |
tree | 782a4c3d88068d75ea57ef65924b7977098c3311 /sofort/cfgtest/cfgtest.sh | |
parent | 67f07d3eace08bf01d452bd15c5672dfe9423843 (diff) | |
download | mmglue-43a058d44fdd807188d2334aabad3ab29c451a54.tar.bz2 mmglue-43a058d44fdd807188d2334aabad3ab29c451a54.tar.xz |
build system: cfgtest_type_size(): config.log integration.
Diffstat (limited to 'sofort/cfgtest/cfgtest.sh')
-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 039b3d9..f54734d 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 } |