automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-14


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-148-g3c774c5
Date: Tue, 24 Jul 2012 17:48:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3c774c5eb56ee1c538d9f153d941dd4596de2db3

The branch, master has been updated
       via  3c774c5eb56ee1c538d9f153d941dd4596de2db3 (commit)
       via  f3af1eb0c7926a203839c9d06fa3e368d5ff4103 (commit)
       via  3ffce6240040e51a60fc5a40cbb8d669baa5f7b5 (commit)
       via  2d5571e7dbfb41eec4a2657c4c076257a320d496 (commit)
       via  158b46f23ea71c9c96e1f298e69cdc9822bcfc46 (commit)
      from  43619a0fa3edc6c0c4ce3b49835d2c48c4afb862 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3c774c5eb56ee1c538d9f153d941dd4596de2db3
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 19:25:02 2012 +0200

    tags: refactor to reduce code duplication (1)
    
    No semantic change is intended.
    
    * lib/am/tags.am (am__uniquify_input): New variable, factor
    out some code common to ...
    (ctags-am, tags-am, ID): ... the recipes of these targets.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f3af1eb0c7926a203839c9d06fa3e368d5ff4103
Merge: 43619a0 158b46f 3ffce62
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 18:43:50 2012 +0200

    Merge branches 'tags-simplify-recursion' and 'color-tests-always'
    
    * tags-simplify-recursion:
      tags: unify recursion for tags targets with that of "usual" targets
    
    * color-tests-always:
      tests: better name for a couple of tests
      check: support colorized testsuite output by default

commit 3ffce6240040e51a60fc5a40cbb8d669baa5f7b5
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 22 17:06:04 2012 +0200

    tests: better name for a couple of tests
    
    * t/color.sh: Rename ...
    * t/color-tests.sh: ... like this.
    * t/color2.sh: Rename ...
    * t/color-tests2.sh: ... like this.
    * t/list-of-tests.mk: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2d5571e7dbfb41eec4a2657c4c076257a320d496
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 22 16:38:47 2012 +0200

    check: support colorized testsuite output by default
    
    Fixes automake bug#11855.
    
    With this change, we make the 'color-tests' option enabled by default.
    That option remains still silently accepted as a no-op, for backward
    compatibility.
    
    The developer of a package is still free to disable testsuite coloring on
    a per-makefile basis (by adding "AM_COLOR_TESTS = no" to the Makefile.am)
    or on a whole-project basis (by AC_SUBST'ing AM_COLOR_TESTS to "no" in
    configure.ac).  But now the user will be able to request the testsuite
    output to be colorized, if he really wants to:
    
        # With GNU make:
        make AM_COLOR_TESTS=yes check
        # With non-GNU make:
        make AM_COLOR_TESTS=yes AM_MAKEFLAGS=AM_COLOR_TESTS=yes check
    
    * NEWS: Update.
    * doc/automake.texi: Updated, and some related minor reformatting
    and rewording.
    * automake.in (handle_tests): No need to pass the transform '%COLOR%'
    when processing "check.am".
    * lib/am/parallel-tests.am: Remove use of the '%?COLOR%' transform;
    just act as if it were unconditionally TRUE.
    * t/color.sh: No need to specify 'color-tests' in 'AUTOMAKE_OPTIONS'
    nor in 'AM_INIT_AUTOMAKE'.
    * t/ax/testsuite-summary-checks.sh: Likewise.
    * t/ax/tap-summary-aux.sh: Likewise.
    * t/color2.sh: Likewise.  Also, ensure that colorized testsuite output
    can be disabled by default by calling "AC_SUBST([AM_COLOR_TESTS], [no])".
    * t/tap-realtime.sh: Define 'AM_COLOR_TESTS' to "no" in Makefile.am, to
    avoid spurious colorization of the output due to the use of the 'expect'
    program.
    * t/color-tests-opt.sh: New test, check that the 'color-tests' option is
    still recognized as a no-op.
    * t/list-of-tests.mk: Add the new test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 158b46f23ea71c9c96e1f298e69cdc9822bcfc46
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 22 11:07:22 2012 +0200

    tags: unify recursion for tags targets with that of "usual" targets
    
    This change has a side effect: now any failure of the 'tags', 'ctags',
    'cscope' and 'cscopelist' targets in a subdirectory will cause the
    recursive command issued from the top directory to fail.  We believe
    that this behavioural change is not only justified by the simplification
    this patch entails, but actually offers better semantics: ignoring
    failures by default is never a good idea, and with make, the user can
    anyway order the completion of commands in the face of possible failures
    with the '-k' option.
    
    * NEWS: Update.
    * automake.in (%required_targets): Add keys 'cscopelist-am', 'tags-am'
    and 'ctags-am'.
    (handle_tags): Greatly simplified, the major part of the handling of
    recursion for the 'tags', 'ctags' and 'cscopelist' now moved out to ...
    * lib/am/tags.am: ... this file, that has been adjusted and extended
    accordingly.
    * t/maken3.sh: Remove testing of the 'TAGS' target, that is now just
    an alias to 'tags'.  Without this change, this test would spuriously
    fail.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                |   11 +++++
 automake.in                         |   84 ++++++++--------------------------
 doc/automake.texi                   |   37 ++++++---------
 lib/am/check.am                     |    5 +--
 lib/am/tags.am                      |   71 ++++++++++++++++-------------
 t/ax/tap-summary-aux.sh             |    1 -
 t/ax/testsuite-summary-checks.sh    |    4 +-
 t/{exdir3.sh => color-tests-opt.sh} |   26 ++++++-----
 t/{color.sh => color-tests.sh}      |    1 -
 t/{color2.sh => color-tests2.sh}    |   18 +++++++-
 t/list-of-tests.mk                  |    5 +-
 t/maken3.sh                         |   10 ++---
 t/tap-realtime.sh                   |    2 +
 13 files changed, 128 insertions(+), 147 deletions(-)
 copy t/{exdir3.sh => color-tests-opt.sh} (68%)
 rename t/{color.sh => color-tests.sh} (99%)
 rename t/{color2.sh => color-tests2.sh} (91%)

diff --git a/NEWS b/NEWS
index 71771cf..0df7b2d 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,13 @@ New in 1.13:
     testsuite harness will still be available through the use of the
     'serial-tests' option (introduced in Automake 1.12).
 
+  - The 'color-tests' option is now unconditionally activated by default.
+    In particular, this means that testsuite output is now colorized by
+    default if the attached terminal seems to support ANSI escapes, and
+    that the user can force output colorization by setting the variable
+    AM_COLOR_TESTS to "always".  The 'color-tests' is still recognized
+    for backward-compatibility, although it's a handled as a no-op now.
+
 * Silent rules support:
 
   - Support for silent rules is now always active in Automake-generated
@@ -91,6 +98,10 @@ New in 1.13:
   specifying the name of such targets in invocations of the new
   'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
 
+  - Any failure in the recipe of the "tags", "ctags", "cscope" or
+    "cscopelist" targets in a subdirectory is now propagated to the
+    top-level make invocation.
+
 * Improvements to aclocal and related rebuilds rules:
 
   - The Autoconf-provided macro AC_CONFIG_MACRO_DIR is now traced by
diff --git a/automake.in b/automake.in
index 4858a39..48ece7f 100644
--- a/automake.in
+++ b/automake.in
@@ -464,9 +464,11 @@ my %required_targets =
    'install-ps-am'   => 1,
    'install-info-am' => 1,
    'installcheck-am' => 1,
-   'uninstall-am' => 1,
-
-   'install-man' => 1,
+   'uninstall-am'    => 1,
+   'tags-am'         => 1,
+   'ctags-am'        => 1,
+   'cscopelist-am'   => 1,
+   'install-man'     => 1,
   );
 
 # Queue to push require_conf_file requirements to.
@@ -3613,71 +3615,26 @@ sub handle_tags
                      '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
                      . "@config", INTERNAL);
 
-    my @tag_deps = ();
-    my @ctag_deps = ();
-    my @cscope_deps = ();
-    if (var ('SUBDIRS'))
-    {
-       $output_rules .= ("tags-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do 
\\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) 
\$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
-                         . "\tdone\n");
-       push (@tag_deps, 'tags-recursive');
-       &depend ('.PHONY', 'tags-recursive');
-       &depend ('.MAKE', 'tags-recursive');
-
-       $output_rules .= ("ctags-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do 
\\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) 
\$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n"
-                         . "\tdone\n");
-       push (@ctag_deps, 'ctags-recursive');
-       &depend ('.PHONY', 'ctags-recursive');
-       &depend ('.MAKE', 'ctags-recursive');
-
-       $output_rules .= ("cscopelist-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do 
\\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) 
\$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
-                         . "\tdone\n");
-       push (@cscope_deps, 'cscopelist-recursive');
-       &depend ('.PHONY', 'cscopelist-recursive');
-       &depend ('.MAKE', 'cscopelist-recursive');
-    }
-
     if (rvar('am__tagged_files')->value_as_list_recursive
-          || var ('ETAGS_ARGS') || @tag_deps)
-    {
-       $output_rules .= &file_contents ('tags',
-                                        new Automake::Location,
-                                        TAGSDIRS  => "@tag_deps",
-                                        CTAGSDIRS => "@ctag_deps",
-                                        CSCOPEDIRS => "@cscope_deps");
-
+          || var ('ETAGS_ARGS') || var ('SUBDIRS'))
+      {
+       $output_rules .= &file_contents ('tags', new Automake::Location);
        set_seen 'TAGS_DEPENDENCIES';
-    }
-    elsif (reject_var ('TAGS_DEPENDENCIES',
-                      "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
-                      . " without\nsources or 'ETAGS_ARGS'"))
-    {
-    }
+      }
     else
-    {
+      {
+        reject_var ('TAGS_DEPENDENCIES',
+                   "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
+                   . " without\nsources or 'ETAGS_ARGS'");
        # Every Makefile must define some sort of TAGS rule.
        # Otherwise, it would be possible for a top-level "make TAGS"
-       # to fail because some subdirectory failed.
-       $output_rules .= "tags: TAGS\nTAGS:\n\n";
-       # Ditto ctags and cscope.
-       $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
-       $output_rules .= "cscope cscopelist:\n\n";
-    }
+       # to fail because some subdirectory failed.  Ditto ctags and
+        # cscope.
+        $output_rules .=
+          "tags TAGS:\n\n" .
+          "ctags CTAGS:\n\n" .
+          "cscope cscopelist:\n\n";
+      }
 }
 
 
@@ -4866,7 +4823,6 @@ sub handle_tests
       push (@check_tests, 'check-TESTS');
       my $check_deps = "@check";
       $output_rules .= &file_contents ('check', new Automake::Location,
-                                      COLOR => !! option 'color-tests',
                                       SERIAL_TESTS => !! option 'serial-tests',
                                        CHECK_DEPS => $check_deps);
 
diff --git a/doc/automake.texi b/doc/automake.texi
index 9ef7e9f..251c26b 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8843,18 +8843,18 @@ run.
 @anchor{Simple tests and color-tests}
 @vindex AM_COLOR_TESTS
 @cindex Colorized testsuite output
-If the Automake option @code{color-tests} is used (@pxref{Options})
-and standard output is connected to a capable terminal, then the test
-results and the summary are colored appropriately.  The user can disable
-colored output by setting the @command{make} variable
address@hidden, or force colored output even without a connecting
-terminal with @samp{AM_COLOR_TESTS=always}.  It's also worth noting that
-some @command{make} implementations, when used in parallel mode, have
-slightly different semantics (@pxref{Parallel make,,, autoconf,
-The Autoconf Manual}), which can break the automatic detection of a
-connection to a capable terminal.  If this is the case, you'll have to
-resort to the use of @samp{AM_COLOR_TESTS=always} in order to have the
-testsuite output colorized.
+If the standard output is connected to a capable terminal, then the test
+results and the summary are colored appropriately.  The developer and the
+user can disable colored output by setting the @command{make} variable
address@hidden; the user can in addition force colored output
+even without a connecting terminal with @samp{AM_COLOR_TESTS=always}.  
+It's also worth noting that some @command{make} implementations,
+when used in parallel mode, have slightly different semantics
+(@pxref{Parallel make,,, autoconf, The Autoconf Manual}), which can
+break the automatic detection of a connection to a capable terminal.
+If this is the case, the user will have to resort to the use of
address@hidden in order to have the testsuite output
+colorized.
 
 Test programs that need data files should look for them in @code{srcdir}
 (which is both a make variable and an environment variable made available
@@ -9279,9 +9279,9 @@ definition of generic and extension-specific 
@code{LOG_COMPILER} and
 @end itemize
 
 @noindent
-On the other hand, the exact semantics of how (and if)
address@hidden, @code{XFAIL_TESTS}, and hard errors are supported
-and handled is left to the individual test drivers.
+On the other hand, the exact semantics of how (and if) testsuite output
+colorization, @code{XFAIL_TESTS}, and hard errors are supported and
+handled is left to the individual test drivers.
 
 @c TODO: We should really add a working example in the doc/ directory,
 @c TODO: and reference if from here.
@@ -9973,13 +9973,6 @@ implies options @option{readme-alpha} and 
@option{check-news}.
 Cause @samp{make dist} to fail unless the current version number appears
 in the first few lines of the @file{NEWS} file.
 
address@hidden @option{color-tests}
address@hidden Option, @option{color-tests}
address@hidden color-tests
-Cause output of the serial and parallel test harnesses (see @ref{Simple
-Tests}) and of properly-written custom test drivers (@pxref{Custom Test
-Drivers}) to be colorized on capable terminals.
-
 @item @option{dejagnu}
 @cindex Option, @option{dejagnu}
 @opindex dejagnu
diff --git a/lib/am/check.am b/lib/am/check.am
index 0bbe2ee..c1e8aac 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -17,7 +17,7 @@
 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 \
@@ -40,9 +40,6 @@ am__tty_colors = { \
     std=''; \
   fi; \
 }
-else !%?COLOR%
-am__tty_colors = $(am__tty_colors_dummy)
-endif !%?COLOR%
 
 .PHONY: check-TESTS
 
diff --git a/lib/am/tags.am b/lib/am/tags.am
index eadb9c0..28338a7 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -14,6 +14,15 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+
 ## ---- ##
 ## ID.  ##
 ## ---- ##
@@ -24,9 +33,7 @@ ID: $(am__tagged_files)
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+         done | $(am__uniquify_input)`;
        mkid -fID $$unique
 
 
@@ -35,13 +42,17 @@ ID: $(am__tagged_files)
 ## ------ ##
 
 ETAGS = etags
-.PHONY: tags
+.PHONY: TAGS tags
 if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += tags TAGS
-endif %?SUBDIRS%
-tags: TAGS
-
-TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
+AM_RECURSIVE_TARGETS += TAGS
+RECURSIVE_TARGETS += tags-recursive
+tags: tags-recursive
+else !%?SUBDIRS%
+tags: tags-am
+endif !%?SUBDIRS%
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## We use the positional parameters to build the subdir list with
 ## absolute names, without the need to worry about white space in `pwd`.
        set x; \
@@ -71,9 +82,7 @@ TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+         done | $(am__uniquify_input)`; \
 ## Remove the 'x' we added first:
        shift; \
 ## Make sure we have something to run etags on.
@@ -96,22 +105,21 @@ TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
 CTAGS = ctags
 .PHONY: CTAGS ctags
 if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += ctags CTAGS
-endif %?SUBDIRS%
-ctags: CTAGS
-
-## We have a dummy name here because 'tags' has already been in use
-## for a long time to mean Emacs-style tags.  Oops.  This means the
-## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
+AM_RECURSIVE_TARGETS += CTAGS
+RECURSIVE_TARGETS += ctags-recursive
+ctags: ctags-recursive
+else !%?SUBDIRS%
+ctags: ctags-am
+endif !%?SUBDIRS%
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## Make sure the list of sources is unique.
        list='$(am__tagged_files)'; \
        unique=`for i in $$list; do \
 ## Handle VPATH correctly.
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+         done | $(am__uniquify_input)`; \
 ## Make sure we have something to run ctags on.
        test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
@@ -134,24 +142,25 @@ GTAGS:
 ## ------- ##
 
 if %?TOPDIR_P%
-
 CSCOPE = cscope
 .PHONY: cscope clean-cscope
 AM_RECURSIVE_TARGETS += cscope
-
 cscope: cscope.files
        test ! -s cscope.files \
          || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files 
$(CSCOPE_ARGS)
-
 clean-cscope:
        -rm -f cscope.files
-
-cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
-
+cscope.files: clean-cscope cscopelist
 endif %?TOPDIR_P%
 
-.PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(am__tagged_files)
+if %?SUBDIRS%
+RECURSIVE_TARGETS += cscopelist-recursive
+cscopelist: cscopelist-recursive
+else !%?SUBDIRS%
+cscopelist: cscopelist-am
+endif !%?SUBDIRS%
+
+cscopelist-am: $(am__tagged_files)
        list='$(am__tagged_files)'; \
        case "$(srcdir)" in \
          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh
index 25fedfe..451020c 100644
--- a/t/ax/tap-summary-aux.sh
+++ b/t/ax/tap-summary-aux.sh
@@ -89,7 +89,6 @@ if test $use_colors = yes; then
   mgn="$esc[0;35m"
   brg="$esc[1m"
   std="$esc[m"
-  echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
 else
   red= grn= lgn= blu= mgn= brg= std=
 fi
diff --git a/t/ax/testsuite-summary-checks.sh b/t/ax/testsuite-summary-checks.sh
index 9137c22..6eafdc9 100644
--- a/t/ax/testsuite-summary-checks.sh
+++ b/t/ax/testsuite-summary-checks.sh
@@ -28,10 +28,8 @@ case $use_colors in
     # Forced colorization should take place also with non-ANSI
     # terminals; hence this setting.
     TERM=dumb; export TERM
-    am_opts='color-tests'
     ;;
   no)
-    am_opts=''
     ;;
   *)
     fatal_ "invalid use_colors='$use_colors'";;
@@ -39,7 +37,7 @@ esac
 
 cat > configure.ac <<END
 AC_INIT([GNU AutoFoo], [7.1], address@hidden)
-AM_INIT_AUTOMAKE([$am_opts])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
diff --git a/t/exdir3.sh b/t/color-tests-opt.sh
similarity index 68%
copy from t/exdir3.sh
copy to t/color-tests-opt.sh
index 6d602cb..87d88c9 100755
--- a/t/exdir3.sh
+++ b/t/color-tests-opt.sh
@@ -14,22 +14,26 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure pkgdatadir can be overridden via AC_SUBST.
+# Check that the 'color-tests' option, now active by default, is
+# nonetheless still silently accepted, for backward compatibility.
 
 . ./defs || exit 1
 
-cat >>configure.ac <<'EOF'
-AC_SUBST([pkgdatadir], ["FOO"])
+cat >configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([color-tests])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
-EOF
+END
 
-cat > Makefile.am << 'EOF'
-showme:
-       @echo $(pkgdatadir)
-EOF
+cat >Makefile.am <<END
+AUTOMAKE_OPTIONS = color-tests
+TESTS = foo.test
+END
+
+: > test-driver
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE
-./configure
-$MAKE showme | grep FOO
+
+:
diff --git a/t/color.sh b/t/color-tests.sh
similarity index 99%
rename from t/color.sh
rename to t/color-tests.sh
index 61158b1..fafa403 100755
--- a/t/color.sh
+++ b/t/color-tests.sh
@@ -34,7 +34,6 @@ AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
 TESTS = $(check_SCRIPTS)
 check_SCRIPTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
diff --git a/t/color2.sh b/t/color-tests2.sh
similarity index 91%
rename from t/color2.sh
rename to t/color-tests2.sh
index e79ab27..65ca6c7 100755
--- a/t/color2.sh
+++ b/t/color-tests2.sh
@@ -58,12 +58,14 @@ rm -f expect-check Makefile
 
 # Do the tests.
 
-cat >>configure.ac <<END
+cat >>configure.ac << 'END'
+if $testsuite_colorized; then :; else
+  AC_SUBST([AM_COLOR_TESTS], [no])
+fi
 AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
 TESTS = $(check_SCRIPTS)
 check_SCRIPTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
@@ -182,6 +184,18 @@ for vpath in false :; do
   cat stdout
   test_no_color
 
+  $srcdir/configure testsuite_colorized=false
+
+  TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
+    || { cat stdout; exit 1; }
+  cat stdout
+  test_no_color
+
+  TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" \
+    expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
+  cat stdout
+  test_color
+
   $MAKE distclean
   cd $srcdir
 
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 7a3aa34..c31a658 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -226,8 +226,9 @@ t/colon4.sh \
 t/colon5.sh \
 t/colon6.sh \
 t/colon7.sh \
-t/color.sh \
-t/color2.sh \
+t/color-tests.sh \
+t/color-tests2.sh \
+t/color-tests-opt.sh \
 t/comment.sh \
 t/comment2.sh \
 t/comment3.sh \
diff --git a/t/maken3.sh b/t/maken3.sh
index 6d580ec..5f5d87a 100755
--- a/t/maken3.sh
+++ b/t/maken3.sh
@@ -22,7 +22,7 @@
 #     special target, the output from make is sufficiently complete.
 #
 # This test exercises the GCS-mandated targets (except for dist)
-# as well as tags, TAGS.
+# as well as tags.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 . ./defs || exit 1
@@ -111,8 +111,6 @@ installcheck-local:
        @: > stamp-installcheck-sub
 tags:
        @: > stamp-tags-sub
-TAGS:
-       @: > stamp-TAGS-sub
 mostlyclean-local:
        @: > stamp-mostlyclean-sub
 maintainer-clean-local:
@@ -127,7 +125,7 @@ html:
        @: > address@hidden
 install-info install-html install-dvi install-pdf install-ps:
        @: > address@hidden
-installcheck installdirs tags TAGS mostlyclean:
+installcheck installdirs tags mostlyclean:
        @: > address@hidden
 ## These targets cannot be overridden like this:
 ## install-strip distclean maintainer-clean
@@ -142,12 +140,12 @@ check_targets ()
     all install install-strip uninstall clean distclean check \
     info html dvi pdf ps \
     install-info install-html install-dvi install-pdf install-ps \
-    installcheck installdirs tags TAGS mostlyclean maintainer-clean
+    installcheck installdirs tags mostlyclean maintainer-clean
   do
     $MAKE -n $target >stdout || { cat stdout; exit 1; }
     cat stdout
     case $target in
-    install-* | installdirs | tags | TAGS ) ;;
+    install-* | installdirs | tags ) ;;
     *)
       if $have_dotmake; then
         grep "stamp-$target$" stdout || exit 1
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
index ecd3bef..97b035c 100755
--- a/t/tap-realtime.sh
+++ b/t/tap-realtime.sh
@@ -53,7 +53,9 @@ fi
 
 cat > Makefile.am << 'END'
 TESTS = all.test
+AM_COLOR_TESTS= no
 END
+
 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
 cat > all.test <<'END'


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]