[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-959-g89b9f35 |
Date: |
Mon, 20 Jun 2011 08:51:32 +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=89b9f35abff0facb71f040444ff5653a8e98b58d
The branch, testsuite-work has been updated
via 89b9f35abff0facb71f040444ff5653a8e98b58d (commit)
via 583daa1e655c4b736da5cd47d275ba8defb388dd (commit)
via b8c2b69913b652bcfd4665b041f11d8b5316da2b (commit)
via 60cd9bc070d62bb9046298792bf344d233620a14 (commit)
via 98fab1246b31bc4eb5d83ac7524d1fd126d0e416 (commit)
via f541f9a4c8a5016ed4d77e54f4a3d707a863feaa (commit)
via d30f97d1b62026c962240887d76355f89175b755 (commit)
via 3fbe45da6f388fa7dd9ed2f33f816a118ba4ea6a (commit)
via 51f59fc244ef6cf13a2784a0ea82ad9ba80a57b4 (commit)
via 474aad06941498f4c4363b6023eb2f0045b73397 (commit)
from 0e3576c2896b5611ca612b51ee182692622058e1 (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 89b9f35abff0facb71f040444ff5653a8e98b58d
Merge: 0e3576c 583daa1
Author: Stefano Lattarini <address@hidden>
Date: Mon Jun 20 10:48:11 2011 +0200
Merge branch 'master' into testsuite-work
* master:
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
tests: more checks on portable fd redirection in TESTS_ENVIRONMENT
docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 77 ++++++++++++++++++++++++++++++
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 +-
tests/tests-environment-fd-redirect.test | 41 ++++++++++++----
25 files changed, 317 insertions(+), 110 deletions(-)
create mode 100755 tests/ansi2knr-deprecation.test
diff --git a/ChangeLog b/ChangeLog
index 1b87a76..1a5c4aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,80 @@
+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-18 Stefano Lattarini <address@hidden>
+
+ tests: more checks on portable fd redirection in TESTS_ENVIRONMENT
+ * tests/tests-environment-fd-redirect.test: Extend by also using
+ a perl script among the tests. Run the test shell script with
+ the `errexit' flag active. Export `VERBOSE' to yes when running
+ "make check", to give more debugging information in case of
+ failures. Look for a Korn Shell also in `/usr/bin', not on only
+ in `/bin'.
+
2011-06-13 Stefano Lattarini <address@hidden>
tests: optimize tests on primary/prefix mismatch for speed
diff --git a/NEWS b/NEWS
index bdf3556..35b223a 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ New in 1.11a:
- New `cscope' target to build a cscope database for the source tree.
+* 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 `dist' and `dist-all' targets now can run compressors in parallel.
diff --git a/THANKS b/THANKS
index 0f4499d..6f39e7d 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 7e84fdd..59ddcfd 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
@@ -2237,8 +2237,9 @@ it more POSIX-like.
@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}
@@ -2462,20 +2463,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:
@@ -2491,10 +2480,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
@@ -3048,8 +3036,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}).
@@ -4012,8 +4000,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
@@ -4628,7 +4618,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
@@ -4659,14 +4649,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_}.
@@ -6788,13 +6778,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
@@ -8461,6 +8452,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
@@ -9174,11 +9180,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 778167a..e8765fd 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -269,6 +269,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 fa58350..18308b0 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -114,15 +114,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
@@ -430,12 +436,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 97ecb68..82ba7ce 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,
@@ -216,12 +222,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)
@@ -401,14 +406,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 2091923..292031f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -189,6 +189,7 @@ amopt.test \
amopts-location.test \
amopts-variable-expansion.test \
amsubst.test \
+ansi2knr-deprecation.test \
ansi.test \
ansi2.test \
ansi3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index cb69125..c1a920b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -119,15 +119,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
@@ -471,6 +477,7 @@ amopt.test \
amopts-location.test \
amopts-variable-expansion.test \
amsubst.test \
+ansi2knr-deprecation.test \
ansi.test \
ansi2.test \
ansi3.test \
@@ -1515,12 +1522,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 aa2eb7f..4998055 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -41,8 +41,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 208bbc5..cb04b5a 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -53,8 +53,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 db6c64f..72bc758 100755
--- a/tests/ansi2.test
+++ b/tests/ansi2.test
@@ -33,6 +33,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 4aca8a2..dccc7f8 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -42,8 +42,8 @@ main (int argc, char *argv[])
END
$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
./configure
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index 48ca7cb..df9000f 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -44,8 +44,8 @@ main (int argc, char *argv[])
END
$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
./configure
diff --git a/tests/ansi4.test b/tests/ansi4.test
index cb2c162..014c308 100755
--- a/tests/ansi4.test
+++ b/tests/ansi4.test
@@ -35,6 +35,6 @@ END
: > hello.c
$ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
$FGREP 'ansi2knr.$(' Makefile.in
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 4490d8b..55c41f9 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -64,8 +64,8 @@ main (int argc, char *argv[])
END
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
./configure
# This is ugly! If we set U at make time then the "wrong" file gets
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 7892d2b..89ca65d 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -59,8 +59,8 @@ foo ()
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/ansi7.test b/tests/ansi7.test
index 231d8c8..b06c22e 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -61,8 +61,8 @@ foo ()
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/ansi8.test b/tests/ansi8.test
index 04563e2..815a9ae 100755
--- a/tests/ansi8.test
+++ b/tests/ansi8.test
@@ -24,5 +24,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 52a68e8..0452405 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -48,8 +48,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 150cc9e..49b4a7e 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.test
@@ -37,7 +37,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 97c8403..0745f61 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -44,7 +44,7 @@ END
: > ansi2knr.c
$ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
$FGREP 'strsignal_.c:' Makefile.in
diff --git a/tests/tests-environment-fd-redirect.test
b/tests/tests-environment-fd-redirect.test
index f9e6d2b..b2b5ab4 100755
--- a/tests/tests-environment-fd-redirect.test
+++ b/tests/tests-environment-fd-redirect.test
@@ -33,41 +33,60 @@ cat >> configure.in << 'END'
AC_OUTPUT
END
+# Use both a shell script and a perl script as tests,
+# for better coverage.
+
cat >foo.test <<'END'
#! /bin/sh
+set -e
echo " " $0: foofoofoo >&8
echo " " $0: barbarbar >&9
END
-chmod a+x foo.test
+
+echo "#! $PERL -w" > bar.test
+cat >>bar.test <<'END'
+use warnings FATAL => 'all';
+use strict;
+open(FD8, ">&=8") or die "$!";
+open(FD9, ">&=9") or die "$!";
+print FD8 " $0: 8888\n";
+print FD9 " $0: 9999\n";
+END
+
+chmod a+x foo.test bar.test
$ACLOCAL
$AUTOCONF
-# /bin/ksh seems more vulnerable to the issue highlighted in coreutils
+# Korn Shells seem more vulnerable to the issue highlighted in coreutils
# bug#8846 than other shells are. In particular, the default Korn Shell
# on Debian GNU/Linux is affected by the issue. So let's try to run our
-# test with /bin/ksh too, if that's available.
-if test "$SHELL" != /bin/ksh && test -f /bin/ksh; then
- bin_ksh=/bin/ksh
-else
- bin_ksh=:
-fi
+# test with a system Korn Shell too, if that's available.
+bin_ksh=:
+case $SHELL in
+ ksh|*/ksh) ;;
+ *) for d in /bin /usr/bin; do
+ test -f $d/ksh && { bin_ksh=$d/ksh; break; }
+ done;;
+esac
for sh in "$SHELL" "$bin_ksh"; do
test "$sh" = : && continue
for pfx in AM_ ''; do
unindent > Makefile.am <<END
- TESTS = foo.test
+ TESTS = foo.test bar.test
## No trailing semicolon here, *deliberately*.
${pfx}TESTS_ENVIRONMENT = 8>&1 9>&8
END
$AUTOMAKE -a
CONFIG_SHELL="$sh" $sh ./configure CONFIG_SHELL="$sh"
- $MAKE check >stdout || { cat stdout; Exit 1; }
+ VERBOSE=y $MAKE check >stdout || { cat stdout; Exit 1; }
cat stdout
grep '[ /]foo\.test: foofoofoo$' stdout
grep '[ /]foo\.test: barbarbar$' stdout
- $EGREP '(foofoofoo|barbarbar)' foo.log && Exit 1
+ grep '[ /]bar\.test: 8888$' stdout
+ grep '[ /]bar\.test: 9999$' stdout
+ $EGREP '(foofoofoo|barbarbar|8888|9999)' foo.log && Exit 1
: # For shells with buggy 'set -e'.
done
done
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-959-g89b9f35,
Stefano Lattarini <=