diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 07:05:25 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 07:05:25 +0000 |
commit | 0664a6377a7fc51e6d96d7b69361cc457e248b00 (patch) | |
tree | 73693b397f6eeae289b23379ce433dc6d3691419 /tool/m4/_colorize_result_prepare.m4 | |
parent | 645e441c32ea5379aef712a9d9a26a6db2c1740b (diff) |
refactor split configure.ac into files
This does not (yet) change anything. The generated configure file
is the identical to previous one (except several empty lines added
and deleted).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/m4/_colorize_result_prepare.m4')
-rw-r--r-- | tool/m4/_colorize_result_prepare.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tool/m4/_colorize_result_prepare.m4 b/tool/m4/_colorize_result_prepare.m4 new file mode 100644 index 0000000000..010abcaccc --- /dev/null +++ b/tool/m4/_colorize_result_prepare.m4 @@ -0,0 +1,26 @@ +AC_DEFUN([_COLORIZE_RESULT_PREPARE], [ + msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset= + AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [ + msg_begin="`tput smso 2>/dev/null`" + AS_CASE(["$msg_begin"], ['@<:@'*m], + [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`" + msg_checking="${msg_begin}33m" + AS_IF([test ${TEST_COLORS:+set}], [ + msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`] + msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`] + msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`] + ]) + msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m" + msg_result_no="${msg_begin}${msg_result_no:-31;1}m" + msg_result_other="${msg_begin}${msg_result_other:-33;1}m" + msg_reset="${msg_begin}m" + ]) + AS_UNSET(msg_begin) + ]) + AS_REQUIRE_SHELL_FN([colorize_result], + [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])], + [AS_CASE(["$[]1"], + [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")], + [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")], + [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])]) +])dnl |