From c3da1625962acf32a47a4e12929fa9d45be9693e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 3 Apr 2018 08:29:51 +0000 Subject: [PATCH] Honor --silent option git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 6 ++++-- tool/m4/_colorize_result_prepare.m4 | 6 +++--- tool/m4/colorize_result.m4 | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index a1ef06a9e2..2c0fc2ae07 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AS_IF([test "$HAVE_BASERUBY" = yes -a "`RUBYOPT=- $BASERUBY -e 'print 42' 2>/dev AS_IF([test "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42' 2>/dev/null`" = 42], [ BASERUBY="$BASERUBY --disable=gems" ]) - $BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub + $BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD ], [ BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" HAVE_BASERUBY=no @@ -3743,7 +3743,7 @@ guard=INCLUDE_RUBY_CONFIG_H ( AS_IF([test "x$CONFIGURE_TTY" = xyes], [color=--color], [color=]) exec ${srcdir}/tool/ifchange $color "${config_h}" - -) || AC_MSG_ERROR([failed to create ${config_h}]) +) >&AS_MESSAGE_FD || AC_MSG_ERROR([failed to create ${config_h}]) tr -d '\015' < largefile.h > confdefs.h rm largefile.h @@ -3857,6 +3857,7 @@ AC_OUTPUT } } +AS_IF([test "$silent" = yes], [], [ AS_IF([${FOLD+:} false], [], [ AS_IF([test "`echo abcdefg hijklmno | fold -s -w10 | sed 1d`" = hijklmno], [FOLD="fold"], [FOLD=]) ]) @@ -3902,3 +3903,4 @@ config_summary "search path" "$search_path" config_summary "static-linked-ext" ${EXTSTATIC:+"yes"} echo "" echo "---" +]) diff --git a/tool/m4/_colorize_result_prepare.m4 b/tool/m4/_colorize_result_prepare.m4 index 16a632e8fe..292155f113 100644 --- a/tool/m4/_colorize_result_prepare.m4 +++ b/tool/m4/_colorize_result_prepare.m4 @@ -21,7 +21,7 @@ AC_DEFUN([_COLORIZE_RESULT_PREPARE], [ 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}"])])]) + [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 diff --git a/tool/m4/colorize_result.m4 b/tool/m4/colorize_result.m4 index 3d2148f8a2..19ff6d49e8 100644 --- a/tool/m4/colorize_result.m4 +++ b/tool/m4/colorize_result.m4 @@ -2,8 +2,8 @@ AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl AS_LITERAL_IF([$1], [m4_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}"])])], + [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}])])], [colorize_result "$1"]) dnl ])dnl