automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, parallel-tests-maint, updat


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, parallel-tests-maint, updated. v1.11-396-g9b61494
Date: Mon, 20 Jun 2011 08:51:31 +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=9b61494445c234e505a2efea8e1c0384591edd2f

The branch, parallel-tests-maint has been updated
       via  9b61494445c234e505a2efea8e1c0384591edd2f (commit)
       via  b8c2b69913b652bcfd4665b041f11d8b5316da2b (commit)
       via  60cd9bc070d62bb9046298792bf344d233620a14 (commit)
       via  98fab1246b31bc4eb5d83ac7524d1fd126d0e416 (commit)
       via  f541f9a4c8a5016ed4d77e54f4a3d707a863feaa (commit)
       via  d30f97d1b62026c962240887d76355f89175b755 (commit)
       via  474aad06941498f4c4363b6023eb2f0045b73397 (commit)
      from  e8bcc4800b17c3fd64b951e0136e7769693edbc8 (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 9b61494445c234e505a2efea8e1c0384591edd2f
Merge: e8bcc48 b8c2b69
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jun 20 10:49:09 2011 +0200

    Merge branch 'maint' into parallel-tests-maint
    
    * maint:
      check: don't use multi-line coloring for the report
      ansi2knr: deprecate, it will go away in the next major release
      docs: primary/prefix combination "pkglib_PROGRAMS" is now invalid
      docs: replace obsolete @vindex entry with a useful one
      docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases

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

Summary of changes:
 ChangeLog                       |   67 ++++++++++++++++++++++++++++++++++
 NEWS                            |    5 +++
 THANKS                          |    1 +
 doc/automake.texi               |   76 ++++++++++++++++++++++-----------------
 lib/Automake/Options.pm         |    4 ++
 lib/Automake/tests/Makefile.in  |   31 +++++++++-------
 lib/am/check.am                 |   46 ++++++++++++++----------
 m4/protos.m4                    |    2 +
 tests/Makefile.am               |    1 +
 tests/Makefile.in               |   32 ++++++++++-------
 tests/ansi.test                 |    4 +-
 tests/ansi10.test               |    4 +-
 tests/ansi2.test                |    2 +-
 tests/ansi2knr-deprecation.test |   69 +++++++++++++++++++++++++++++++++++
 tests/ansi3.test                |    4 +-
 tests/ansi3b.test               |    4 +-
 tests/ansi4.test                |    2 +-
 tests/ansi5.test                |    4 +-
 tests/ansi6.test                |    4 +-
 tests/ansi7.test                |    4 +-
 tests/ansi8.test                |    2 +-
 tests/ansi9.test                |    4 +-
 tests/cxxansi.test              |    2 +-
 tests/libobj8.test              |    2 +-
 24 files changed, 277 insertions(+), 99 deletions(-)
 create mode 100755 tests/ansi2knr-deprecation.test

diff --git a/ChangeLog b/ChangeLog
index 26fb9fa..f87c8bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
+2011-06-20  Bert Wesarg <address@hidden>  (tiny change)
+
+       check: don't use multi-line coloring for the report
+       "less -R" can't handle multi-line coloring as it is done for the
+       check reports of the serial and parallel testsuite, because of
+       performance reasons.  Thus, color each line of the check report
+       by its own.
+       * lib/am/check.am (am__text_box): Accept colors for lines, and
+       color each line by its own.
+       [%?PARALLEL_TESTS%] $(TEST_SUITE_LOG): Let am__text_box handle
+       the line coloring.
+       [!%?PARALLEL_TESTS%] $(check-TESTS): Color each report line by
+       its own.
+       * THANKS: Update.
+
+2011-06-18  Stefano Lattarini  <address@hidden>
+
+       docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases
+       * doc/automake.texi (Checking the Distribution): Explain that the
+       developers should take care of making their code buildable without
+       requiring any special configure options, so that in general
+       AM_DISTCHECK_CONFIGURE_FLAGS shouldn't be used.  Give an example
+       of where its use is legitimate.
+       Suggestions from Ralf Wildenhues and Eric Blake.
+
+2011-06-14  Stefano Lattarini  <address@hidden>
+
+       ansi2knr: deprecate, it will go away in the next major release
+       * doc/automake.texi: Loudly and repeatedly state that the old
+       de-ANSI-fication features are now deprecated and will be removed
+       in the next major Automake release.  Other related adjustments.
+       * lib/Automake/Options.pm (_process_option_list ): Give a warning
+       in the `obsolete' category when the `ansi2knr' option is used.
+       * m4/protos.m4 (AM_C_PROTOTYPES): Deprecate this macro: a warning
+       in the `obsolete' category will be emitted it if is used.
+       * tests/ansi2knr-deprecation.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * tests/ansi.test: Adjust, by calling autoconf and/or automake
+       with the `-Wno-obsolete' flag.
+       * tests/ansi10.test: Likewise.
+       * tests/ansi2.test: Likewise.
+       * tests/ansi3.test: Likewise.
+       * tests/ansi3b.test: Likewise.
+       * tests/ansi4.test: Likewise.
+       * tests/ansi5.test: Likewise.
+       * tests/ansi6.test: Likewise.
+       * tests/ansi7.test: Likewise.
+       * tests/ansi8.test: Likewise.
+       * tests/ansi9.test: Likewise.
+       * tests/cxxansi.test: Likewise.
+       * tests/libobj8.test: Likewise.
+       * NEWS: Update about the future planned backward-incompatibility
+       due to the removal of de-ANSI-fication feature.
+
+2011-06-19  Stefano Lattarini  <address@hidden>
+
+       docs: primary/prefix combination "pkglib_PROGRAMS" is now invalid
+       * doc/automake.texi (Program Sources): pkglib_PROGRAMS is not a
+       valid combination anymore, so don't document it.  Inconsistency
+       introduced in commit `v1.11-373-g9ca6326'.
+
+2011-06-19  Jim Meyering  <address@hidden>
+
+       docs: replace obsolete @vindex entry with a useful one
+       * doc/automake.texi (Program Sources): Do not index obsolete
+       pkglib_PROGRAMS here.  Do index pkglibexec_PROGRAMS.
+
 2011-06-13  Stefano Lattarini  <address@hidden>
 
        tests: optimize tests on primary/prefix mismatch for speed
diff --git a/NEWS b/NEWS
index fd7dd53..29c552b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 New in 1.11.0a:
 
+* WARNING: Future backward-incompatibilities!
+
+  - The Automake support for automatic de-ANSI-fication will be removed in
+    the next major Automake release (1.12).
+
 * Miscellaneous changes:
 
   - The `lzma' compression scheme and associated automake option `dist-lzma'
diff --git a/THANKS b/THANKS
index 16a1ef8..3d71419 100644
--- a/THANKS
+++ b/THANKS
@@ -37,6 +37,7 @@ Benoit Sigoure                address@hidden
 Bernard Giroud         address@hidden
 Bernard Urban          address@hidden
 Bernd Jendrissek       address@hidden
+Bert Wesarg            address@hidden
 Bill Currie            address@hidden
 Bill Davidson          address@hidden
 Bill Fenner            address@hidden
diff --git a/doc/automake.texi b/doc/automake.texi
index b9ef339..e0b38fc 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -232,7 +232,7 @@ Building Programs and Libraries
 * Java Support::                Compiling Java sources
 * Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
-* ANSI::                        Automatic de-ANSI-fication (obsolete)
+* ANSI::                        Automatic de-ANSI-fication (deprecated, soon 
to be removed)
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
 
@@ -2226,8 +2226,9 @@ source in case you need more recent versions.
 @table @code
 @item ansi2knr.c
 @itemx ansi2knr.1
-These two files are used for de-ANSI-fication support (obsolete
address@hidden).
+These two files are used for de-ANSI-fication support (they are
+deprecated now, and @emph{will be removed} in the next major Automake
+release; @pxref{ANSI}).
 
 @item compile
 This is a wrapper for compilers that do not accept options @option{-c}
@@ -2447,20 +2448,8 @@ false.o: true.c
         $(COMPILE) -DEXIT_CODE=1 -c true.c && mv true.o false.o
 @end example
 
-Also, these explicit rules do not work if the obsolete de-ANSI-fication feature
-is used (@pxref{ANSI}).  Supporting de-ANSI-fication requires a little
-more work:
-
address@hidden
-true_.o: true_.c false_.o
-        $(COMPILE) -DEXIT_CODE=0 -c true_.c
-
-false_.o: true_.c
-        $(COMPILE) -DEXIT_CODE=1 -c true_.c && mv true_.o false_.o
address@hidden example
-
 As it turns out, there is also a much easier way to do this same task.
-Some of the above techniques are useful enough that we've kept the
+Some of the above technique is useful enough that we've kept the
 example in the manual.  However if you were to build @code{true} and
 @code{false} in real life, you would probably use per-program
 compilation flags, like so:
@@ -2476,10 +2465,9 @@ true_CPPFLAGS = -DEXIT_CODE=0
 @end example
 
 In this case Automake will cause @file{true.c} to be compiled twice,
-with different flags.  De-ANSI-fication will work automatically.  In
-this instance, the names of the object files would be chosen by
-automake; they would be @file{false-true.o} and @file{true-true.o}.
-(The name of the object files rarely matters.)
+with different flags.  In this instance, the names of the object files
+would be chosen by automake; they would be @file{false-true.o} and
address@hidden (The name of the object files rarely matters.)
 
 
 @node Invoking Automake
@@ -3033,8 +3021,8 @@ this way, e.g., @code{AC_PATH_XTRA} defines 
@code{X_CFLAGS} and
 if @code{AC_PATH_XTRA} is called.
 
 @item AM_C_PROTOTYPES
-This is required when using the obsolete de-ANSI-fication feature; see
address@hidden
+This is required when using the deprecated de-ANSI-fication feature; see
address@hidden  @emph{It will be removed} in the next major Automake release.
 
 @item AM_CONDITIONAL
 This introduces an Automake conditional (@pxref{Conditionals}).
@@ -4010,8 +3998,10 @@ Autoconf Manual}).
 Check to see if function prototypes are understood by the compiler.  If
 so, define @samp{PROTOTYPES} and set the output variables @code{U} and
 @code{ANSI2KNR} to the empty string.  Otherwise, set @code{U} to
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}.  Automake uses these
-values to implement the obsolete de-ANSI-fication feature.
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}.  Automake used these
+values to implement the deprecated de-ANSI-fication feature; however,
+support for @emph{that feature will be removed} in the next major Automake
+release, and then @emph{these macros and variables will go away as well}.
 
 @item AM_CONFIG_HEADER
 @acindex AM_CONFIG_HEADER
@@ -4611,7 +4601,7 @@ to build programs and libraries.
 * Java Support::                Compiling Java sources
 * Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
-* ANSI::                        Automatic de-ANSI-fication (obsolete)
+* ANSI::                        Automatic de-ANSI-fication (deprecated, soon 
to be removed)
 * Dependencies::                Automatic dependency tracking
 * EXEEXT::                      Support for executable extensions
 @end menu
@@ -4642,14 +4632,14 @@ programs.  Most of the comments about these also apply 
to libraries
 @vindex bin_PROGRAMS
 @vindex sbin_PROGRAMS
 @vindex libexec_PROGRAMS
address@hidden pkglib_PROGRAMS
address@hidden pkglibexec_PROGRAMS
 @vindex noinst_PROGRAMS
 @vindex check_PROGRAMS
 
 In a directory containing source that gets built into a program (as
 opposed to a library or a script), the @code{PROGRAMS} primary is used.
 Programs can be installed in @code{bindir}, @code{sbindir},
address@hidden, @code{pkglibdir}, @code{pkglibexecdir}, or not at all
address@hidden, @code{pkglibexecdir}, or not at all
 (@code{noinst_}).  They can also be built only for @samp{make check}, in
 which case the prefix is @samp{check_}.
 
@@ -6760,13 +6750,14 @@ suffix rule handling (@pxref{Suffixes}).
 
 
 @node ANSI
address@hidden Automatic de-ANSI-fication
address@hidden Automatic de-ANSI-fication (deprecated, soon to be removed)
 
 @cindex de-ANSI-fication, defined
 
-The features described in this section are obsolete; you should not
-used any of them in new code, and they may be withdrawn in future
-Automake releases.
address@hidden features described in this section are deprecated; you must
+not use any of them in new code, and remove their use from older but
+still maintained code: they will be withdrawn in the next major
+Automake release.}
 
 When the C language was standardized in 1989, there was a long
 transition period where package developers needed to worry about
@@ -8433,6 +8424,21 @@ to supply additional flags to @command{configure}, 
define them in the
 provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
 on the command line when invoking @command{make}.
 
+Still, developers are encouraged to strive to make their code buildable
+without requiring any special configure option; thus, in general, you
+shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
+might be few scenarios in which the use of this variable is justified.
+GNU @command{m4} offers an example.  GNU @command{m4} configures by
+default with its experimental and seldom used "changeword" feature
+disabled; so in its case it is useful to have @command{make distcheck}
+run configure with the @option{--with-changeword} option, to ensure that
+the code for changeword support still compiles correctly.
+GNU @command{m4} also employs the @code{AM_DISTCHECK_CONFIGURE_FLAGS}
+variable to stress-test the use of @option{--program-prefix=g}, since at
+one point the @command{m4} build system had a bug where @command{make
+installcheck} was wrongly assuming it could blindly test "@command{m4}",
+rather than the just-installed "@command{gm4}".
+
 @trindex distcheck-hook
 If the @code{distcheck-hook} rule is defined in your top-level
 @file{Makefile.am}, then it will be invoked by @code{distcheck} after
@@ -9077,11 +9083,15 @@ implies options @option{readme-alpha} and 
@option{check-news}.
 @itemx @address@hidden/ansi2knr}
 @cindex Option, @option{ansi2knr}
 @opindex ansi2knr
-Turn on the obsolete de-ANSI-fication feature.  @xref{ANSI}.  If preceded by a
+Turn on the deprecated de-ANSI-fication feature (@xref{ANSI}).  Note
+that that feature and this option @emph{will be removed} in the next
+major Automake release.
+
+If preceded by a
 path, the generated @file{Makefile.in} will look in the specified
 directory to find the @file{ansi2knr} program.  The path should be a
 relative path to another directory in the same distribution (Automake
-currently does not check this).
+does not check this).
 
 @item @option{check-news}
 @cindex Option, @option{check-news}
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 9543aa5..b7ff3d1 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -252,6 +252,10 @@ sub _process_option_list (\%$@)
        }
       elsif (/^(.*\/)?ansi2knr$/)
        {
+          # This feature is deprecated, will be removed in the next
+          # Automake major release.
+          msg 'obsolete', $where,
+              "automatic de-ANSI-fication support is deprecated\n";
          # An option like "../lib/ansi2knr" is allowed.  With no
          # path prefix, we assume the required programs are in this
          # directory.  We save the actual option for later.
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 7ed17d6..2f553ed 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -105,15 +105,21 @@ am__base_list = \
 am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
@@ -394,12 +400,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
        $$exit
 
 # Run all the tests.
diff --git a/lib/am/check.am b/lib/am/check.am
index 4d10ce9..0b54312 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -75,15 +75,21 @@ am__rst_title   = sed 's/.*/   &   
/;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
@@ -213,12 +219,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
        $$exit
 
 RECHECK_LOGS = $(TEST_LOGS)
@@ -398,14 +403,17 @@ check-TESTS: $(TESTS)
          fi; \
          dashes=`echo "$$dashes" | sed s/./=/g`; \
          if test "$$failed" -eq 0; then \
-           echo "$$grn$$dashes"; \
+           col="$$grn"; \
          else \
-           echo "$$red$$dashes"; \
+           col="$$red"; \
          fi; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes$$std"; \
+## Multi line coloring is problematic with "less -R", so we really need
+## to color each line individually.
+         echo "$${col}$$dashes$${std}"; \
+         echo "$${col}$$banner$${std}"; \
+         test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+         test -z "$$report" || echo "$${col}$$report$${std}"; \
+         echo "$${col}$$dashes$${std}"; \
          test "$$failed" -eq 0; \
        else :; fi
 
diff --git a/m4/protos.m4 b/m4/protos.m4
index 427193b..f710293 100644
--- a/m4/protos.m4
+++ b/m4/protos.m4
@@ -13,6 +13,8 @@
 
 AC_DEFUN([AM_C_PROTOTYPES],
 [AC_REQUIRE([AC_C_PROTOTYPES])
+AC_DIAGNOSE([obsolete],
+            [$0: automatic de-ANSI-fication support is deprecated])
 if test "$ac_cv_prog_cc_stdc" != no; then
   U= ANSI2KNR=
 else
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 66edfc0..c9e4fc4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -89,6 +89,7 @@ amassign.test \
 ammissing.test \
 amopt.test \
 amsubst.test \
+ansi2knr-deprecation.test \
 ansi.test \
 ansi2.test \
 ansi3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d64bdb0..6ae3c69 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -108,15 +108,21 @@ am__base_list = \
 am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = $(AWK) '{                               \
-  n = split($$0, lines, "\\.  "); max = 0;             \
-  for (i = 1; i <= n; ++i)                             \
-    if (max < length(lines[i]))                                \
-      max = length(lines[i]);                          \
-  for (i = 0; i < max; ++i) line = line "=";           \
-  print line;                                          \
-  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
-  print line;                                          \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{                       \
+  n = split($$0, lines, "\\.  "); max = 0;     \
+  for (i = 1; i <= n; ++i)                     \
+    if (max < length(lines[i]))                        \
+      max = length(lines[i]);                  \
+  for (i = 0; i < max; ++i)                    \
+    line = line "=";                           \
+  print col line std;                          \
+  for (i = 1; i <= n; ++i)                     \
+    if (lines[i])                              \
+      print col lines[i] std;                  \
+  print col line std;                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
@@ -360,6 +366,7 @@ amassign.test \
 ammissing.test \
 amopt.test \
 amsubst.test \
+ansi2knr-deprecation.test \
 ansi.test \
 ansi2.test \
 ansi3.test \
@@ -1255,12 +1262,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $(am__tty_colors);                                              \
        if $$exit; then                                                 \
-         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+         col="$$grn";                                                  \
         else                                                           \
-         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+         col="$$red";                                                  \
        fi;                                                             \
-       echo "$$msg" | $(am__text_box);                                 \
-       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
+       echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";         \
        $$exit
 
 # Run all the tests.
diff --git a/tests/ansi.test b/tests/ansi.test
index 7795f48..0aa000e 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -42,8 +42,8 @@ END
 : > ansi2knr.1
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete
 
 ./configure
 
diff --git a/tests/ansi10.test b/tests/ansi10.test
index 88b8618..4ff2c86 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -55,8 +55,8 @@ main (int argc, char **argv)
 END
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi2.test b/tests/ansi2.test
index 77ca2c6..504c8c3 100755
--- a/tests/ansi2.test
+++ b/tests/ansi2.test
@@ -35,6 +35,6 @@ END
 : > ansi2knr.1
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 grep '^all[-a-z]*:.*ANSI2KNR' Makefile.in
diff --git a/tests/ansi2knr-deprecation.test b/tests/ansi2knr-deprecation.test
new file mode 100755
index 0000000..543d9c6
--- /dev/null
+++ b/tests/ansi2knr-deprecation.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011 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/>.
+
+# Check that the use of automatic de-ANSI-fication feature is deprecated.
+# That feature will be removed in the next major Automake release.
+
+. ./defs || Exit 1
+
+set -e
+
+warn_rx='automatic de-ANSI-fication.*deprecated'
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_C_PROTOTYPES
+END
+
+$ACLOCAL
+
+$AUTOCONF -Wall -Werror -Wno-obsolete
+$AUTOCONF -Wnone -Wobsolete -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep "^configure\\.in:5:.* AM_C_PROTOTYPES:.*$warn_rx" stderr
+
+sed '/AM_C_PROTOTYPES/d' configure.in > config.stub
+diff configure.in config.stub && fatal_ "failed to edit configure.in"
+rm -f configure.in
+
+cat > Makefile.stub <<'END'
+ANSI2KNR = :
+U =
+END
+
+for opt in ansi2knr lib/ansi2knr; do
+  # ansi2knr option in Makefile.am
+  cp config.stub configure.in
+  cp Makefile.stub Makefile.am
+  echo "AUTOMAKE_OPTIONS = $opt" >> Makefile.am
+  cat Makefile.am # For debugging.
+  $AUTOMAKE -Wno-obsolete
+  AUTOMAKE_fails
+  grep "^Makefile\.am:3:.*$warn_rx" stderr
+  AUTOMAKE_fails -Wnone -Wobsolete
+  grep "^Makefile\.am:3:.*$warn_rx" stderr
+  # ansi2knr option in configure.in
+  cp Makefile.stub Makefile.am
+  sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" config.stub > configure.in
+  cat configure.in # For debugging.
+  $AUTOMAKE -Wno-obsolete
+  AUTOMAKE_fails
+  grep "^configure\.in:2:.*$warn_rx" stderr
+  AUTOMAKE_fails -Wnone -Wobsolete
+  grep "^configure\.in:2:.*$warn_rx" stderr
+done
+
+:
diff --git a/tests/ansi3.test b/tests/ansi3.test
index e1e0c42..22ef485 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -51,8 +51,8 @@ export CFLAGS
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'Makefile.am:1:.*ansi2knr\.c' stderr
 CC='gcc' ./configure
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index ad222ff..0688781 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -52,8 +52,8 @@ export CFLAGS
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'configure.in:2:.*ansi2knr\.1' stderr
 CC='gcc' ./configure
diff --git a/tests/ansi4.test b/tests/ansi4.test
index 63250a9..0c0d339 100755
--- a/tests/ansi4.test
+++ b/tests/ansi4.test
@@ -37,6 +37,6 @@ END
 : > hello.c
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 $FGREP 'ansi2knr.$(' Makefile.in
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7..d152be0 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -66,8 +66,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea..691614d 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -61,8 +61,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f517..9eae26b 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -63,8 +63,8 @@ END
 set -e
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
 
 # Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
 test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi8.test b/tests/ansi8.test
index 33f17dc..bcf99b1 100755
--- a/tests/ansi8.test
+++ b/tests/ansi8.test
@@ -26,5 +26,5 @@ bin_PROGRAMS = hello
 END
 
 $ACLOCAL
-AUTOMAKE_fails -a
+AUTOMAKE_fails -Wno-obsolete -a
 grep AM_C_PROTOTYPES stderr
diff --git a/tests/ansi9.test b/tests/ansi9.test
index 4eb1820..ab78dda 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -50,8 +50,8 @@ mkdir sub
 cp loadavg.c sub/sub.c
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing -Wno-override
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE --add-missing -Wno-override -Wno-obsolete
 
 $FGREP 'loadavg-loadavg$U.o: loadavg$U.c' Makefile.in
 # The following rule should not exist, because the
diff --git a/tests/cxxansi.test b/tests/cxxansi.test
index 8bbe9b2..9d6fd6e 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.test
@@ -39,7 +39,7 @@ END
 : > jane.C
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
 
 $FGREP 'jane$U' Makefile.in && Exit 1
 $FGREP 'doe$U' Makefile.in
diff --git a/tests/libobj8.test b/tests/libobj8.test
index c06746b..206bca6 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -45,6 +45,6 @@ END
 : > ansi2knr.c
 
 $ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$AUTOMAKE  -Wno-obsolete || Exit 1
 
 grep 'strsignal_.c:' Makefile.in


hooks/post-receive
-- 
GNU Automake



reply via email to

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