From: Stefano Lattarini Date: Mon, 21 May 2012 22:58:58 +0000 (+0200) Subject: [ng] check: move definition of console colors in its own '.am' fragment X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3eb27283dbe3328f333b3344c11216f788974d2;p=thirdparty%2Fautomake.git [ng] check: move definition of console colors in its own '.am' fragment This is only meant to simplify future changes. No semantic change is intended. * lib/am/check.am: Include ... * lib/am/check.am (am__tty_colors, am__tty_colors_dummy): Move out to ... * lib/am/color-tests.am: ... this new file. * Makefile.am (dist_am_DATA): Adjust. Signed-off-by: Stefano Lattarini --- diff --git a/Makefile.am b/Makefile.am index 39cde8592..0da444a6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -225,6 +225,7 @@ EXTRA_DIST += lib/Automake/Config.in dist_am_DATA = \ lib/am/check.am \ lib/am/check2.am \ + lib/am/color-tests.am \ lib/am/clean-hdr.am \ lib/am/clean.am \ lib/am/compile.am \ diff --git a/lib/am/check.am b/lib/am/check.am index 782fdd6ca..5a3cff240 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -14,35 +14,7 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -if %?COLOR% -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ -## If stdout is a non-dumb tty, use colors. If test -t is not supported, -## then this check fails; a conservative approach. Of course do not -## redirect stdout here, just stderr. - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -else !%?COLOR% -am__tty_colors = $(am__tty_colors_dummy) -endif !%?COLOR% +include color-tests.am .PHONY: check-TESTS diff --git a/lib/am/color-tests.am b/lib/am/color-tests.am new file mode 100644 index 000000000..db91049ac --- /dev/null +++ b/lib/am/color-tests.am @@ -0,0 +1,45 @@ +## automake - create Makefile.in from Makefile.am +## Copyright (C) 2001-2012 Free Software Foundation, Inc. + +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. + +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . + +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +if %?COLOR% +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ +## If stdout is a non-dumb tty, use colors. If test -t is not supported, +## then this check fails; a conservative approach. Of course do not +## redirect stdout here, just stderr. + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +else !%?COLOR% +am__tty_colors = $(am__tty_colors_dummy) +endif !%?COLOR%