[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 06/17] [ng] check: move definition of console color
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 06/17] [ng] check: move definition of console colors in its own '.am' fragment |
Date: |
Tue, 22 May 2012 22:48:44 +0200 |
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 <address@hidden>
---
Makefile.am | 1 +
lib/am/check.am | 30 +-----------------------------
lib/am/color-tests.am | 45 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 29 deletions(-)
create mode 100644 lib/am/color-tests.am
diff --git a/Makefile.am b/Makefile.am
index 39cde85..0da444a 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 782fdd6..5a3cff2 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 <http://www.gnu.org/licenses/>.
-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='[0;31m'; \
- grn='[0;32m'; \
- lgn='[1;32m'; \
- blu='[1;34m'; \
- mgn='[0;35m'; \
- brg='[1m'; \
- std='[m'; \
- 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 0000000..db91049
--- /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 <http://www.gnu.org/licenses/>.
+
+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='[0;31m'; \
+ grn='[0;32m'; \
+ lgn='[1;32m'; \
+ blu='[1;34m'; \
+ mgn='[0;35m'; \
+ brg='[1m'; \
+ std='[m'; \
+ fi; \
+}
+else !%?COLOR%
+am__tty_colors = $(am__tty_colors_dummy)
+endif !%?COLOR%
--
1.7.9.5
- [Automake-NG] [PATCH 00/17] Move almost parallel-tests processing at make runtime, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 01/17] [ng] am: new private make variable $(am__all_progs), Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 02/17] [ng] serial-tests: simplify automake-time preprocessing, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 03/17] [ng] tests: get rid of an almost-obsolete test case (parallel-tests related), Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 04/17] [ng] am: implement $(am__tolower) and $(am__toupper), Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 05/17] [ng] refactor: make '$am_config_aux_dir' available as a make variable, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 06/17] [ng] check: move definition of console colors in its own '.am' fragment,
Stefano Lattarini <=
- [Automake-NG] [PATCH 07/17] [ng] check: separate serial an parallel harnesses in distinct '.am' files, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 08/17] [ng] check: warn about invalid TEST_EXTENSIONS at make runtime, Stefano Lattarini, 2012/05/22
- [Automake-NG] [PATCH 09/17] [ng] check: unconditionally distribute test-driver, Stefano Lattarini, 2012/05/22
[Automake-NG] [PATCH 10/17] [ng] am: new make variable '$(am__handle_exxext)', Stefano Lattarini, 2012/05/22