[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-5
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-589-g91ea62a |
Date: |
Sat, 05 Nov 2011 15:17:49 +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=91ea62abccb87e2a1ae989bae95640d8913d2970
The branch, yacc-work has been updated
via 91ea62abccb87e2a1ae989bae95640d8913d2970 (commit)
via 1ba50d12baadb27e463c6e6c73bf19ddd53c65e4 (commit)
via a45c636491dda9b628266c2dfed5457a90baba1e (commit)
via 3df373a8d62784eeab87452a42a08d11b7e75722 (commit)
via 12f0a41009a4277f0ee705afa7cb2750451379dd (commit)
via 182935ac18db1d6eb324c452b465c097a5bfabf0 (commit)
via cb9f2c28b2cb8bdcc942468008765598f87f425c (commit)
via 1ec1668645acc84c2f2ae78d5a3da6f9e50ca429 (commit)
via 9b5ced02fd41130d408d95808855a067eb82dd68 (commit)
via beef7a6673037dee4508e91ef9b4515e0b0246f0 (commit)
via 6a2fe8188c546a1cdf0bfbb72f6ac9f1fcd70b78 (commit)
via e98cba8d0c5d7b1826b1a450a750346a13b4da13 (commit)
via 40c34328d1e5d3ab6885f046ce27517332413c13 (commit)
via ded01c88c9579656cc138ce7e0b55dcf025b1a5a (commit)
via 0c0b402635f34abd5dd6e33a81d89dd8057a0d73 (commit)
via 253c2e7e4afc90ca4b9077f9b85fbc0944133ef9 (commit)
from 0f3b3e840715c4a287e1f467ce552820d07253fd (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 126 ++++++++++++
NEWS | 12 ++
THANKS | 5 +-
automake.in | 9 -
doc/Makefile.in | 9 +-
doc/automake.texi | 15 ++
lib/am/dejagnu.am | 20 ++-
lib/am/texinfos.am | 22 +--
m4/maintainer.m4 | 6 +-
tests/Makefile.am | 10 +-
tests/Makefile.in | 10 +-
tests/check12.test | 206 ++++++++++++++++++++
...ronment.test => dejagnu-absolute-builddir.test} | 35 +++-
tests/dejagnu-relative-srcdir.test | 86 ++++++++
...va-sources.test => dejagnu-siteexp-append.test} | 67 ++++---
tests/dejagnu-siteexp-extend.test | 161 +++++++++++++++
tests/dejagnu-siteexp-useredit.test | 69 +++++++
tests/dejagnu.test | 7 +-
tests/dejagnu2.test | 21 ++-
tests/dejagnu3.test | 17 +-
tests/dejagnu4.test | 19 ++-
tests/dejagnu5.test | 19 +-
tests/dejagnu6.test | 16 +-
tests/dejagnu7.test | 10 +-
tests/help-maintainer.test | 61 ------
tests/install-info-dir.test | 140 +++++++++++++
tests/maintmode-configure-msg.test | 79 ++++++++
27 files changed, 1068 insertions(+), 189 deletions(-)
create mode 100755 tests/check12.test
copy tests/{check-tests_environment.test => dejagnu-absolute-builddir.test}
(61%)
create mode 100755 tests/dejagnu-relative-srcdir.test
copy tests/{java-sources.test => dejagnu-siteexp-append.test} (55%)
create mode 100755 tests/dejagnu-siteexp-extend.test
create mode 100755 tests/dejagnu-siteexp-useredit.test
delete mode 100755 tests/help-maintainer.test
create mode 100755 tests/install-info-dir.test
create mode 100755 tests/maintmode-configure-msg.test
diff --git a/ChangeLog b/ChangeLog
index f79cdb0..83e7a52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,129 @@
+2011-11-03 Zack Weinberg <address@hidden> (tiny change)
+ Stefano Lattarini <address@hidden>
+
+ maint-mode: fix botched configure messages
+ This change fixes automake bug#9890.
+ * m4/maintainer.m4 (AM_MAINTAINER_MODE): Fix the "checking ..."
+ configure message related to the enabling/disabling of maintainer
+ mode.
+ * tests/help-maintainer.test: Renamed ...
+ * tests/maintmode-configure-msg.test: ... to this, and extended
+ to cover the fixed bug. Also, since we are at it, make grepping
+ of configure help screens stricter, and throw in some few other
+ changes to reduce code duplication and enhance readability.
+ * tests/Makefile.am (TESTS): Update.
+ * THANKS: Update with Zack's new e-mail address.
+ Report and initial patch by Zack Weinberg, test cases added by
+ Stefano Lattarini.
+
+2011-10-23 Stefano Lattarini <address@hidden>
+
+ info: allow user to inhibit creation/update of '${infodir}/dir'
+ With this change, we allow the user to request the install-info
+ rules not to update the `${infodir}/dir' file, by exporting the
+ environment variable `AM_UPDATE_INFO_DIR' to the value "no".
+ This is especially useful to distro packagers, and is a definite
+ improvement over our previous hack of looking whether the
+ `install-info' program was the Debian or GNU version -- hack
+ which had been silently broken with recent versions of debian
+ install-info BTW (probably since dpkg 1.15.4, 2009-09-06).
+ This change fixes automake bug#9773. See also Debian Bug#543992.
+ * lib/am/texinfos.am: Don't look anymore at the output of
+ `install-info --version' to decide whether to use it to update
+ the `${infodir}/dir' or not; instead, honour the environment
+ variable `AM_UPDATE_INFO_DIR'.
+ * tests/install-info-dir.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+ * tests/defs: Also unset `AM_UPDATE_INFO_DIR', to avoid unwanted
+ interferences from the environment.
+ * doc/automake.texi (Texinfo): Update.
+ * NEWS: Likewise.
+ * THANKS: Likewise.
+ Report by Jonathan Nieder.
+
+2011-10-20 Stefano Lattarini <address@hidden>
+
+ deps: partially revert commit `v1.11-512-geeee551'
+ This change partly reverts commit "Create subdirs for generated
+ sources even when not dep tracking", of 2011-04-02.
+ That commit had caused the bugs #8485 and #8526. Since we are
+ nearing the bug-fixing automake release 1.11.2, the safest policy
+ at the moment is to just revert the problematic hunks: an older,
+ known bug is better than a regression.
+ * automake.in (handle_single_transform): Don't add a dirstamp
+ dependency, even when $object is derived and lands in a subdir.
+ * tests/Makefile.am (XFAIL_TESTS): Add lex-subobj-nodep.test,
+ remove yacc-dist-nobuild-subdir.test.
+
+2011-10-19 Stefano Lattarini <address@hidden>
+
+ dejagnu: allow the package developer to extend site.exp
+ Fixes automake bug#7873.
+ * lib/am/dejagnu.am (site.exp): Depend from the files listed in
+ $(EXTRA_DEJAGNU_SITE_CONFIG), if any. Append their contents to
+ the generated site.exp (still preserving user edits).
+ * doc/automake.texi (Dejagnu Tests): Update.
+ * tests/dejagnu-siteexp-append.test: New test.
+ * tests/dejagnu-siteexp-extend.test: Likewise.
+ * tests/dejagnu-siteexp-useredit.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+ * NEWS: Update.
+ Suggestion by Rainer Orth.
+
+2011-10-19 Stefano Lattarini <address@hidden>
+
+ dejagnu: ensure 'srcdir' is defined as a relative directory
+ This change fixes automake bug#7833.
+ * lib/am/dejagnu.am (check-DEJAGNU): Prefer using plain $(srcdir)
+ over calculating and using the absolute path of $(srcdir).
+ * tests/dejagnu-relative-srcdir.test: New test.
+ * tests/dejagnu-absolute-builddir.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+ Report by Ian Lance Taylor. Suggestions by Ralf Wildenhues.
+
+2010-12-13 Ralf Wildenhues <address@hidden>
+
+ Fix testsuite failure of check12.test without DejaGNU.
+ * tests/check12.test: Require runtest.
+
+2010-12-10 Stefano Lattarini <address@hidden>
+
+ Extend and improve tests on DejaGnu support.
+ * tests/dejagnu.test: Do not create useless dummy test script.
+ Add trailing `:' command. In heading comments, add reference
+ to ...
+ * tests/check12.test: ... this new "semantic" test, covering
+ concurrent use of dejagnu tests, simple tests and `check-local'
+ target.
+ * tests/dejagnu2.test: Make test more reliable, by avoid weak
+ grepping of make output. Prefer `cat' over `echo' to append
+ to configure.in. Quote literal dots in grep regexps. Prefer
+ `grep -c ...' over `grep ... | wc -l'. Make grepping of
+ automake stderr slightly stricter. Add trailing `:' command.
+ * tests/dejagnu3.test: Prefer `cat' over `echo' to append to
+ configure.in. Check stderr of expected-to-fail "make" call.
+ Remove extra blank lines from Makefile.am.
+ * tests/dejagnu4.test: Prefer `cat' over `echo' to append to
+ configure.in. Prefer `mv -f' over plain `mv' when the target
+ file already exists. Avoid extra mkdir calls by creating more
+ directories at once. Better use of blank lines. Check that
+ the `*.log' and `*.sum' files are created by runtest also when
+ "make check" fails.
+ * tests/dejagnu7.test: Prefer `cat' over `echo' to append to
+ configure.in. Better use of blank lines. Add a trailing `:'
+ command.
+ * tests/dejagnu6.test: Likewise, and give the dejagnu test a
+ more descriptive name.
+ * tests/dejagnu5.test: Likewise. Also, simply define package
+ name to `$me' rather than using a non-obvious sed script to
+ extract it from `AC_INIT', and write the Makefile.am with only
+ one command.
+ * tests/Makefile.am (TESTS): Updated.
+
+2011-10-21 Peter Rosin <address@hidden>
+
+ * THANKS: Fix whitespace issue.
+
2011-10-18 Stefano Lattarini <address@hidden>
tests: fix spurious failure with FreeBSD make and Yacc in VPATH
diff --git a/NEWS b/NEWS
index 12fd2ec..130d244 100644
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,14 @@ New in 1.11.0a:
user; still, the old Makefile.am files that used to define it should
still continue to work as before.
+ - When using DejaGnu-based testsuites, the user can extend the `site.exp'
+ file generated by automake-provided rules by defining the special make
+ variable `$(EXTRA_DEJAGNU_SITE_CONFIG)'.
+
+ - The `install-info' rule can now be instructed not to create/update
+ the `${infodir}/dir' file, by exporting the new environment variable
+ `AM_UPDATE_INFO_DIR' to the value "no".
+
* Changes to Yacc support:
- C source and header files derived from non-distributed Yacc and/or
@@ -147,6 +155,10 @@ Bugs fixed in 1.11.0a:
processes, honour the configure-time definitions of AUTOCONF and
AUTOM4TE.
+ - The `install-info' recipe does not try anymore to guess whether the
+ `install-info' program is from Debian or from GNU, and adaptively
+ change its behaviour; this has proven to be frail and easy to regress.
+
New in 1.11:
diff --git a/THANKS b/THANKS
index ad9a448..7e6de25 100644
--- a/THANKS
+++ b/THANKS
@@ -83,7 +83,7 @@ Diab Jerius address@hidden
Didier Cassirame address@hidden
Dieter Baron address@hidden
Dieter Jurzitza address@hidden
-ÐилÑн ÐалаÑзов address@hidden
+ÐилÑн ÐалаÑзов address@hidden
Dmitry Mikhin address@hidden
Dmitry V. Levin address@hidden
Doug Evans address@hidden
@@ -171,6 +171,7 @@ John Pierce address@hidden
John Ratliff address@hidden
John R. Cary address@hidden
John W. Coomes address@hidden
+Jonathan Nieder address@hidden
Josh MacDonald address@hidden
Joshua Cowan address@hidden
js pendry address@hidden
@@ -366,7 +367,7 @@ William Pursell address@hidden
William S Fulton address@hidden
Yann Droneaud address@hidden
Younes Younes address@hidden
-Zack Weinberg address@hidden
+Zack Weinberg address@hidden
Zbigniew JÄdrzejewski-Szmek address@hidden
Zoltan Rado address@hidden
diff --git a/automake.in b/automake.in
index 622ff15..a089470 100755
--- a/automake.in
+++ b/automake.in
@@ -2051,15 +2051,6 @@ sub handle_single_transform ($$$$$%)
# derived from is not.
&push_dist_common ($object)
unless ($topparent =~ /^(?:nobase_)?nodist_/);
-
- # If resulting derived source is in a subdir, we need to make
- # sure the subdir exists at build time.
- if ($object =~ /\//)
- {
- my $dirstamp = require_build_directory_maybe ($object);
- depend ($object, $dirstamp)
- if ($dirstamp);
- }
next;
}
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 04bb38a..9726e8c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -725,8 +725,13 @@ install-info-am: $(INFO_DEPS)
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian)
>/dev/null 2>&1; then \
+ @am__run_installinfo=yes; \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) am__run_installinfo=no;; \
+ *) (install-info --version) >/dev/null 2>&1 \
+ || am__run_installinfo=no;; \
+ esac; \
+ if test $$am__run_installinfo = yes; then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
diff --git a/doc/automake.texi b/doc/automake.texi
index 4338c1e..fdd0a86 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7967,6 +7967,13 @@ be prevented via the @code{no-installinfo} option. In
this case,
@file{.info} files are not installed by default, and user must
request this explicitly using @samp{make install-info}.
address@hidden AM_UPDATE_INFO_DIR
+By default, @code{make install-info} will try to run the
address@hidden program (if available) to update (or create)
+the @address@hidden@address@hidden/dir} index. If this is undesired, it
+can be prevented by exporting the @code{AM_UPDATE_INFO_DIR} variable
+to "@code{no}".
+
The following variables are used by the Texinfo build rules.
@vtable @code
@@ -9064,6 +9071,14 @@ not the place where the test suite author should define
new variables:
this should be done elsewhere in the real test suite code.
Especially, @file{site.exp} should not be distributed.
+Still, if the package author has legitimate reasons to extend
address@hidden at @command{make} time, he can do so by defining
+the variable @code{EXTRA_DEJAGNU_SITE_CONFIG}; the files listed
+there will be considered @file{site.exp} prerequisites, and their
+content will be appended to it (in the same order in which they
+appear in @code{EXTRA_DEJAGNU_SITE_CONFIG}). Note that files are
address@hidden distributed by default.
+
For more information regarding DejaGnu test suites, see @ref{Top, , ,
dejagnu, The DejaGnu Manual}.
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index 08de45c..660050a 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -44,7 +44,7 @@ endif ! %?CYGNUS%
.PHONY: check-DEJAGNU
check-DEJAGNU: site.exp
## Life is easiest with an absolute srcdir, so do that.
- srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+ srcdir='$(srcdir)'; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
## Allow this to work when expect and DejaGnu are in tree.
## Only required when --cygnus in force.
@@ -72,12 +72,12 @@ check-DEJAGNU: site.exp
## Note that in the rule we don't directly generate site.exp to avoid
## the possibility of a corrupted site.exp if make is interrupted.
## Jim Meyering has some useful text on this topic.
-site.exp: Makefile
+site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##'
>site.tmp
@echo '# Do not edit here. If you wish to override these values'
>>site.tmp
@echo '# edit the last section' >>site.tmp
- @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo 'set srcdir "$(srcdir)"' >>site.tmp
@echo "set objdir `pwd`" >>site.tmp
## Quote the *_alias variables because they might be empty.
?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp
@@ -86,9 +86,17 @@ site.exp: Makefile
?HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
?TARGET? @echo 'set target_alias "$(target_alias)"' >>site.tmp
?TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp
- @echo '## All variables above are generated by configure. Do Not Edit
##' >>site.tmp
- @test ! -f site.exp || \
- sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+## Allow the package author to extend site.exp.
+ @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
+ echo "## Begin content included from file $$f. Do not modify. ##" \
+ && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
+ && echo "## End content included from file $$f. ##" \
+ || exit 1; \
+ done >> site.tmp
+ @echo "## End of auto-generated content; you can edit from here. ##" >>
site.tmp
+ @if test -f site.exp; then \
+ sed -e '1,/^## End of auto-generated content.*##/d' site.exp >>
site.tmp; \
+ fi
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index c9dcd9d..80712cf 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -208,18 +208,16 @@ install-info-am: $(INFO_DEPS)
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
-## Only run this code if install-info actually exists, and it is not
-## the Debian install-info. FIXME: once Debian install-info goes
-## away, we can remove this hack. Some versions of Debian install-info
-## print their version on stderr (e.g. 1.8.3), other do it in
-## on stdout (e.g. 1.10.15).
-##
-## Do not use
-## install-info --version 2>&1 | sed 1q | grep -v -i debian
-## as if install-info does not exist, grep -v will be happy, and
-## therefore the code will be triggered although install-info is missing.
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian)
>/dev/null 2>&1; then \
+## Only run this code if install-info actually exists, and if the user
+## doesn't request it not to be run (through the `AM_UPDATE_INFO_DIR'
+## environment variable). See automake bug#9773 and Debian Bug#543992.
+ @am__run_installinfo=yes; \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) am__run_installinfo=no;; \
+ *) (install-info --version) >/dev/null 2>&1 \
+ || am__run_installinfo=no;; \
+ esac; \
+ if test $$am__run_installinfo = yes; then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
## Strip directory
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index 0b54e67..085e96c 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -1,8 +1,8 @@
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -22,7 +22,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&address@hidden: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions
of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules
and dependencies not useful
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4d700c4..22d058b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,7 +27,7 @@ dist-auxfile-2.test \
gcj6.test \
java-nobase.test \
pr8365-remake-timing.test \
-yacc-dist-nobuild-subdir.test \
+lex-subobj-nodep.test \
vala-vpath.test \
txinfo5.test
@@ -297,6 +297,11 @@ dejagnu4.test \
dejagnu5.test \
dejagnu6.test \
dejagnu7.test \
+dejagnu-absolute-builddir.test \
+dejagnu-relative-srcdir.test \
+dejagnu-siteexp-extend.test \
+dejagnu-siteexp-append.test \
+dejagnu-siteexp-useredit.test \
depacl2.test \
depcomp.test \
depcomp2.test \
@@ -419,7 +424,6 @@ help-depend2.test \
help-dmalloc.test \
help-init.test \
help-lispdir.test \
-help-maintainer.test \
help-multilib.test \
help-python.test \
help-regex.test \
@@ -434,6 +438,7 @@ init2.test \
insh2.test \
install2.test \
installdir.test \
+install-info-dir.test \
instsh.test \
instsh2.test \
instsh3.test \
@@ -554,6 +559,7 @@ lzma.test \
m4-inclusion.test \
maintclean.test \
maintclean-vpath.test \
+maintmode-configure-msg.test \
make.test \
makej.test \
makej2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index cc4be0e..945c44d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -298,7 +298,7 @@ dist-auxfile-2.test \
gcj6.test \
java-nobase.test \
pr8365-remake-timing.test \
-yacc-dist-nobuild-subdir.test \
+lex-subobj-nodep.test \
vala-vpath.test \
txinfo5.test
@@ -581,6 +581,11 @@ dejagnu4.test \
dejagnu5.test \
dejagnu6.test \
dejagnu7.test \
+dejagnu-absolute-builddir.test \
+dejagnu-relative-srcdir.test \
+dejagnu-siteexp-extend.test \
+dejagnu-siteexp-append.test \
+dejagnu-siteexp-useredit.test \
depacl2.test \
depcomp.test \
depcomp2.test \
@@ -703,7 +708,6 @@ help-depend2.test \
help-dmalloc.test \
help-init.test \
help-lispdir.test \
-help-maintainer.test \
help-multilib.test \
help-python.test \
help-regex.test \
@@ -718,6 +722,7 @@ init2.test \
insh2.test \
install2.test \
installdir.test \
+install-info-dir.test \
instsh.test \
instsh2.test \
instsh3.test \
@@ -838,6 +843,7 @@ lzma.test \
m4-inclusion.test \
maintclean.test \
maintclean-vpath.test \
+maintmode-configure-msg.test \
make.test \
makej.test \
makej2.test \
diff --git a/tests/check12.test b/tests/check12.test
new file mode 100755
index 0000000..34c8409
--- /dev/null
+++ b/tests/check12.test
@@ -0,0 +1,206 @@
+#! /bin/sh
+# Copyright (C) 2010 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/>.
+
+# Test to make sure dejagnu tests, automake-style tests, and check-local
+# target can coexist.
+
+required=runtest
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS =
+EXTRA_DIST =
+CLEANFILES =
+END
+
+## Simple tests.
+
+cat > a.test << 'END'
+#!/bin/sh
+exit ${A_EXIT_STATUS-0}
+END
+cat > b.test << 'END'
+#!/bin/sh
+exit ${B_EXIT_STATUS-0}
+END
+chmod +x a.test b.test
+
+cat >> Makefile.am << 'END'
+TESTS = a.test b.test
+EXTRA_DIST += $(TESTS)
+END
+
+A_EXIT_STATUS=0; export A_EXIT_STATUS
+B_EXIT_STATUS=0; export B_EXIT_STATUS
+
+## DejaGnu tests.
+
+cat >> Makefile.am << 'END'
+AUTOMAKE_OPTIONS += dejagnu
+DEJATOOL = hammer spanner
+AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer SPANNER=$(srcdir)/spanner
+EXTRA_DIST += hammer.test/hammer.exp
+EXTRA_DIST += spanner.test/spanner.exp
+END
+
+cat > hammer << 'END'
+#! /bin/sh
+echo "Everything looks like a ${NAIL-nail} to me!"
+END
+
+NAIL=nail; export NAIL
+
+cat > spanner << 'END'
+#! /bin/sh
+echo "I'm a right spanner!"
+END
+chmod +x hammer spanner
+
+mkdir hammer.test spanner.test
+
+cat > hammer.test/hammer.exp << 'END'
+set test test_hammer
+spawn $HAMMER
+expect {
+ "Everything looks like a nail to me!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+cat > spanner.test/spanner.exp << 'END'
+set test test_spanner
+spawn $SPANNER
+expect {
+ "I'm a right spanner!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+## User-defined extra tests.
+
+cat >> Makefile.am <<'END'
+check-local:
+ case $$CHECKLOCAL_EXIT_STATUS in \
+ 0) echo 'check-local succeded :-)';; \
+ *) echo 'check-local failed :-(';; \
+ esac >local.log
+ exit $$CHECKLOCAL_EXIT_STATUS
+CLEANFILES += local.log
+END
+CHECKLOCAL_EXIT_STATUS=0; export CHECKLOCAL_EXIT_STATUS
+
+## Go with the testcase execution.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+for vpath in : false; do
+
+ if $vpath; then
+ srcdir=..
+ mkdir build_
+ cd build_
+ else
+ srcdir=.
+ fi
+
+ if test -f config.status; then
+ $MAKE distclean
+ fi
+
+ $srcdir/configure
+
+ $MAKE check
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^PASS: b\.test (exit: 0)' b.log
+ else
+ :
+ fi
+ grep 'check-local succeded :-)' local.log
+
+ cp -f config.status config-status.sav
+
+ $MAKE distclean
+ test ! -r hammer.log
+ test ! -r hammer.sum
+ test ! -r spanner.log
+ test ! -r spanner.sum
+ test ! -r test-suite.log
+ test ! -r a.log
+ test ! -r b.log
+ test ! -r local.log
+
+ mv -f config-status.sav config.status
+ ./config.status
+
+ NAIL=screw $MAKE check && Exit 1
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+
+ B_EXIT_STATUS=1 $MAKE check && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 1)' b.log
+ grep '^FAIL: b\.test (exit: 1)' test-suite.log
+ else :; fi
+
+ CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
+ grep 'check-local failed :-(' local.log
+
+ # Do not trust the exit status of `make -k'.
+ NAIL=screw B_EXIT_STATUS=23 CHECKLOCAL_EXIT_STATUS=1 $MAKE -k check || :
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 23)' b.log
+ grep '^FAIL: b\.test (exit: 23)' test-suite.log
+ else :; fi
+ grep 'check-local failed :-(' local.log
+
+ cd $srcdir
+
+done
+
+$MAKE distcheck
+
+:
diff --git a/tests/check-tests_environment.test
b/tests/dejagnu-absolute-builddir.test
similarity index 61%
copy from tests/check-tests_environment.test
copy to tests/dejagnu-absolute-builddir.test
index a07ab95..ad9578f 100755
--- a/tests/check-tests_environment.test
+++ b/tests/dejagnu-absolute-builddir.test
@@ -14,8 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
+# Check that DejaGnu testsuites have 'objdir' defined (as a TCL variable)
+# to an absolute path.
+required=runtest
. ./defs || Exit 1
set -e
@@ -25,23 +27,36 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
+AUTOMAKE_OPTIONS = dejagnu
+DEJATOOL = tcl env
+EXTRA_DIST = tcl.test/tcl.exp
END
-cat > foo.test << 'END'
-#! /bin/sh
-test x"$FOO" = x"ok"
+mkdir tcl.test
+
+cat > tcl.test/tcl.exp << 'END'
+send_user "tcl_objdir: $objdir\n"
+if { [ regexp "^/" $objdir ] } {
+ pass "test_tcl_objdir"
+} else {
+ fail "test_tcl_objdir"
+}
END
-chmod a+x foo.test
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE --add-missing
./configure
-FOO=bad TESTS_ENVIRONMENT='FOO=ok' $MAKE check
-FOO=ok TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+$MAKE check
+
+# Sanity check: all tests have run.
+test -f env.log
+test -f env.sum
+test -f tcl.log
+test -f tcl.sum
+
+$MAKE distcheck
:
diff --git a/tests/dejagnu-relative-srcdir.test
b/tests/dejagnu-relative-srcdir.test
new file mode 100755
index 0000000..8a70d58
--- /dev/null
+++ b/tests/dejagnu-relative-srcdir.test
@@ -0,0 +1,86 @@
+#! /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 DejaGnu testsuites have 'srcdir' defined to a relative path
+# (both as TCL variable and as environment variable).
+
+required=runtest
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = dejagnu
+DEJATOOL = tcl env
+EXTRA_DIST = env.test/env.exp tcl.test/tcl.exp lib/tcl.exp
+END
+
+mkdir env.test tcl.test lib
+
+# DejaGnu can change $srcdir behind our backs, so we have to
+# save its original value. Thanks to Ian Lance Taylor for the
+# suggestion.
+cat > lib/tcl.exp << 'END'
+send_user "tcl_lib_srcdir: $srcdir\n"
+set orig_srcdir $srcdir
+END
+
+cat > env.test/env.exp << 'END'
+set env_srcdir $env(srcdir)
+send_user "env_srcdir: $env_srcdir\n"
+if { [ regexp "^\.\.?$" $env_srcdir ] } {
+ pass "test_env_src"
+} else {
+ fail "test_env_src"
+}
+END
+
+cat > tcl.test/tcl.exp << 'END'
+send_user "tcl_srcdir: $srcdir\n"
+if { [ regexp "^\.\.?$" $srcdir ] } {
+ pass "test_tcl_src"
+} else {
+ fail "test_tcl_src"
+}
+send_user "tcl_orig_srcdir: $orig_srcdir\n"
+if { [ regexp "^\.\.?$" $orig_srcdir ] } {
+ pass "test_tcl_orig_src"
+} else {
+ fail "test_tcl_orig_src"
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --srcdir=.
+
+$MAKE check
+
+# Sanity check: all tests have run.
+test -f env.log
+test -f env.sum
+test -f tcl.log
+test -f tcl.sum
+
+$MAKE distcheck
+
+:
diff --git a/tests/java-sources.test b/tests/dejagnu-siteexp-append.test
similarity index 55%
copy from tests/java-sources.test
copy to tests/dejagnu-siteexp-append.test
index 770eb2d..7bd34ed 100755
--- a/tests/java-sources.test
+++ b/tests/dejagnu-siteexp-append.test
@@ -14,8 +14,8 @@
# 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 definition of automake-generated private Makefile variable
-# `$(am__java_sources)'.
+# Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
+# site.exp in the same order in which they're listed in that variable.
. ./defs || Exit 1
@@ -26,42 +26,47 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-foodir = $(prefix)
-
-foo_JAVA = a.java
-dist_foo_JAVA = b.java
-nodist_foo_JAVA = c.java
-nobase_foo_JAVA = d.java
-nobase_dist_foo_JAVA = e.java
-nobase_nodist_foo_JAVA = f.java
-
-.PHONY: debug
-debug:
- @echo 'am__java_sources: "$(am__java_sources)"'
-got:
- @lst='$(am__java_sources)'; \
- for f in $$lst; do echo $$f; done | sort > $@
+AUTOMAKE_OPTIONS = dejagnu
+DEJATOOL = tool
END
$ACLOCAL
-$AUTOMAKE
$AUTOCONF
+$AUTOMAKE --add-missing
-cat > exp << 'END'
-a.java
-b.java
-c.java
-d.java
-e.java
-f.java
+./configure
+
+$MAKE site.exp
+sed '/^##.*##$/d' site.exp > expected
+
+cat > foo.exp << 'END'
+foo1
+foo2
+foo3
END
-./configure
-$MAKE debug
-$MAKE got
+cat foo.exp - >> expected << 'END'
+BAR 1
+# foo
+BAR 2
+END
+
+cat >> Makefile.am << 'END'
+EXTRA_DEJAGNU_SITE_CONFIG = foo.exp bar.exp
+bar.exp:
+ @(echo 'BAR 1' && echo '# foo' && echo 'BAR 2') > $@
+END
+
+$AUTOMAKE Makefile
+./config.status Makefile
+
+rm -f site.exp
+$MAKE site.exp
+sed '/^##.*##$/d' site.exp > obtained
+
+cat expected
+cat site.exp
-cat got
-cat exp
-diff exp got
+diff expected obtained
:
diff --git a/tests/dejagnu-siteexp-extend.test
b/tests/dejagnu-siteexp-extend.test
new file mode 100755
index 0000000..591267e
--- /dev/null
+++ b/tests/dejagnu-siteexp-extend.test
@@ -0,0 +1,161 @@
+#! /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 developer can extend the site.exp generated by the
+# automake-generated Makefile.
+
+required=runtest
+. ./defs || Exit 1
+
+set -e
+
+write_check_for ()
+{
+ echo "send_user \"$1: \$$1\\n\""
+ cat << END
+if { \$$1 == "/$1/" } {
+ pass "test_$1"
+} else {
+ fail "test_$1"
+}
+END
+}
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = dejagnu
+DEJATOOL = tool
+
+EXTRA_DIST = tool.test/tool.exp
+
+EXTRA_DEJAGNU_SITE_CONFIG = foo.exp
+EXTRA_DIST += foo.exp
+END
+
+echo 'set foo "/foo/"' > foo.exp
+
+mkdir tool.test
+write_check_for foo > tool.test/tool.exp
+cat tool.test/tool.exp
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE check
+cat foo.exp
+cat site.exp
+grep 'PASS: test_foo' tool.sum
+
+write_check_for bar >> tool.test/tool.exp
+write_check_for baz >> tool.test/tool.exp
+cat tool.test/tool.exp
+
+# Ensure that foo.exp will be newer than site.exp, which will
+# thus have to be remade.
+$sleep
+# With this, below we'll also check that settings in files coming later in
+# $(EXTRA_DEJAGNU_SITE_CONFIG) override those in files coming earlier.
+cat >> foo.exp <<'END'
+set bar "/foo/"
+set baz "/foo/"
+set qux "/foo/"
+END
+
+$MAKE check && { cat site.exp; Exit 1; }
+grep 'PASS: test_foo' tool.sum
+grep 'FAIL: test_bar' tool.sum
+grep 'FAIL: test_baz' tool.sum
+
+cat >> Makefile.am << 'END'
+EXTRA_DEJAGNU_SITE_CONFIG += bar bar.dir/bar
+EXTRA_DIST += bar
+DISTCLEANFILES = bar.dir/bar
+bar.dir/bar:
+ test -d bar.dir || mkdir bar.dir
+ echo 'set baz "/baz/"' > $@
+END
+
+echo 'set bar "/bar/"' > bar
+# This will allow us to check one more time that settings in files
+# coming later in $(EXTRA_DEJAGNU_SITE_CONFIG) override those in
+# files coming earlier.
+echo 'set baz "/xyz/"' >> bar
+
+# Ensure that the Makefile will be newer than site.exp, which will
+# thus have to be remade.
+$sleep
+$AUTOMAKE Makefile
+./config.status Makefile
+
+$MAKE check || { cat site.exp; Exit 1; }
+cat site.exp
+cat bar.dir/bar
+$FGREP '/bar/' site.exp
+$FGREP '/baz/' site.exp
+grep 'PASS: test_foo' tool.sum
+grep 'PASS: test_bar' tool.sum
+grep 'PASS: test_baz' tool.sum
+
+# Check that the features we're testing behave well in VPATH builds.
+$MAKE distcheck
+
+# Check that the user can edit the site.exp file, and that his edits
+# are retained.
+write_check_for zardoz >> tool.test/tool.exp
+cat tool.test/tool.exp
+echo 'set zardoz "/zardoz/"' >> site.exp
+
+$MAKE check
+cat site.exp
+grep 'PASS: test_zardoz' tool.sum
+
+cat >> Makefile.am << 'END'
+EXTRA_DEJAGNU_SITE_CONFIG += quux.exp
+quux.exp:
+ echo 'set zardoz "/quux/"' > $@
+END
+
+# Ensure that the Makefile will be newer than on site.exp, which will
+# thus have to be remade.
+$sleep
+$AUTOMAKE Makefile
+./config.status Makefile
+grep 'zardoz.*/quux/' Makefile
+
+$MAKE site.exp
+cat site.exp
+cat quux.exp
+grep 'zardoz.*/quux/' site.exp
+
+$MAKE check
+grep 'PASS: test_zardoz' tool.sum
+grep 'zardoz: /zardoz/' tool.log
+grep 'zardoz.*quux' tool.log && Exit 1
+
+# Check that files in $(EXTRA_DEJAGNU_SITE_CONFIG) are not distributed
+# by default.
+$MAKE distdir
+ls -l $me-1.0
+test ! -r $me-1.0/bar.dir/bar
+test ! -r $me-1.0/quux.exp
+
+:
diff --git a/tests/dejagnu-siteexp-useredit.test
b/tests/dejagnu-siteexp-useredit.test
new file mode 100755
index 0000000..a51bc40
--- /dev/null
+++ b/tests/dejagnu-siteexp-useredit.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 user can edit the Makefile-generated site.exp, and
+# have its edits survive to the remaking of that file.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = dejagnu
+DEJATOOL = foo
+END
+
+# Deliberately select a variable defined automatically by
+# the Makefile-generated site.exp.
+mkdir foo.test
+cat > foo.test/foo.exp << 'END'
+send_user "objdir: $objdir\n"
+set pipe "|"
+if { $objdir == "${pipe}objdir${pipe}" } {
+ pass "test_obj"
+} else {
+ fail "test_obj"
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE site.exp
+echo 'set objdir "|objdir|"' >> site.exp
+cat site.exp
+$sleep
+touch Makefile
+$MAKE site.exp
+cat site.exp
+is_newest site.exp Makefile # Sanity check.
+grep '|objdir|' site.exp
+test `grep -c '|objdir|' site.exp` -eq 1
+
+# We can done a "more semantic" check if DejaGnu is available.
+if runtest SOMEPROGRAM=someprogram --version; then
+ $MAKE check
+ grep 'PASS: test_obj' foo.sum
+fi
+
+:
diff --git a/tests/dejagnu.test b/tests/dejagnu.test
index a273770..b3e58e7 100755
--- a/tests/dejagnu.test
+++ b/tests/dejagnu.test
@@ -14,7 +14,8 @@
# 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 dejagnu tests and automake-style tests can coexist.
+# Superficial test to check that dejagnu tests and automake-style
+# tests can coexist. See also related deeper test `check12.test'.
. ./defs || Exit 1
@@ -25,10 +26,10 @@ AUTOMAKE_OPTIONS = dejagnu
TESTS = frob.test
END
-: > frob.test
-
$ACLOCAL
$AUTOMAKE
grep '^check-TESTS' Makefile.in
grep '^check-DEJAGNU' Makefile.in
+
+:
diff --git a/tests/dejagnu2.test b/tests/dejagnu2.test
index 531f744..121f6d8 100755
--- a/tests/dejagnu2.test
+++ b/tests/dejagnu2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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
@@ -20,26 +20,29 @@
set -e
-echo 'AC_OUTPUT' >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
site.exp:
- @echo foo
+ echo :GREP:ME: > $@
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wno-override
-grep site.exp Makefile.in
-test `grep '^site\.exp:' Makefile.in | wc -l` -eq 1
+grep 'site\.exp' Makefile.in
+test `grep -c '^site\.exp:' Makefile.in` -eq 1
./configure
-$MAKE site.exp >stdout
-cat stdout
-grep foo stdout
+$MAKE site.exp
+grep ':GREP:ME:' site.exp
AUTOMAKE_fails
-grep 'Makefile.am:3:.*site.exp' stderr
+grep '^Makefile\.am:3:.*site\.exp' stderr
+
+:
diff --git a/tests/dejagnu3.test b/tests/dejagnu3.test
index d812ac4..2c5d375 100755
--- a/tests/dejagnu3.test
+++ b/tests/dejagnu3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -28,15 +28,14 @@ END
chmod +x hammer
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = hammer
-
AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer
-
EXTRA_DIST = hammer hammer.test/hammer.exp
END
@@ -65,5 +64,9 @@ $MAKE distcheck
# Ensure that the envvar RUNTESTFLAGS is used.
# Report from Mark Mitchell.
-RUNTESTFLAGS=--unknown-option $MAKE check && Exit 1
-Exit 0
+RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
+ && { cat output; Exit 1; }
+cat output
+$FGREP 'unknown-runtest-option' output
+
+:
diff --git a/tests/dejagnu4.test b/tests/dejagnu4.test
index 5fdda10..fa64a31 100755
--- a/tests/dejagnu4.test
+++ b/tests/dejagnu4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010 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
@@ -26,17 +26,17 @@ cat > hammer << 'END'
#! /bin/sh
echo "Everything looks like a nail to me!"
END
-
chmod +x hammer
cat > spanner << 'END'
#! /bin/sh
echo "I'm a right spanner!"
END
-
chmod +x spanner
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
@@ -49,8 +49,7 @@ EXTRA_DIST = hammer hammer.test/hammer.exp
EXTRA_DIST += spanner spanner.test/spanner.exp
END
-mkdir hammer.test
-mkdir spanner.test
+mkdir hammer.test spanner.test
cat > hammer.test/hammer.exp << 'END'
set test test
@@ -86,8 +85,14 @@ $MAKE distcheck
# Test for PR 488.
sed 's/E\(verything\)/Not e\1/' hammer > thammer
-mv thammer hammer
+mv -f thammer hammer
chmod +x hammer
+rm -f hammer.log hammer.sum spanner.log spanner.sum
$MAKE check && Exit 1
+test -f hammer.log
+test -f hammer.sum
+test -f spanner.log
+test -f spanner.sum
+
:
diff --git a/tests/dejagnu5.test b/tests/dejagnu5.test
index 0095958..0237a08 100755
--- a/tests/dejagnu5.test
+++ b/tests/dejagnu5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -22,30 +22,27 @@ required=runtest
set -e
-# Get the package name from configure.in.
-package=`$FGREP AC_INIT configure.in | sed -e 's:^[^[]*\[\([^]]*\)\].*$:\1:'`
+package=$me
cat > $package << 'END'
#! /bin/sh
echo "Ah, we have been expecting you, Mr. Blond."
END
-
chmod +x $package
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << END
AUTOMAKE_OPTIONS = dejagnu
-
EXTRA_DIST = $package $package.test/$package.exp
+AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package
END
-echo "AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package" >> Makefile.am
-
mkdir $package.test
-
cat > $package.test/$package.exp << 'END'
-set test "test"
+set test "a_dejagnu_test"
spawn $PACKAGE
expect {
"Ah, we have been expecting you, Mr. Blond." { pass "$test" }
@@ -64,3 +61,5 @@ test -f $package.log
test -f $package.sum
$MAKE distcheck
+
+:
diff --git a/tests/dejagnu6.test b/tests/dejagnu6.test
index 25a1f1f..662ca28 100755
--- a/tests/dejagnu6.test
+++ b/tests/dejagnu6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -25,23 +25,21 @@ cat > faildeja << 'END'
#! /bin/sh
echo whatever
END
-
chmod +x faildeja
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = faildeja
-
AM_RUNTESTFLAGS = FAILDEJA=$(srcdir)/faildeja
END
mkdir faildeja.test
-
cat > faildeja.test/faildeja.exp << 'END'
-set test test
+set test failing_deja_test
spawn $FAILDEJA
expect {
default { fail "$test" }
@@ -57,4 +55,6 @@ $AUTOMAKE --add-missing
$MAKE check && Exit 1
test -f faildeja.log
test -f faildeja.sum
-$FGREP 'FAIL: test' faildeja.sum
+$FGREP 'FAIL: failing_deja_test' faildeja.sum
+
+:
diff --git a/tests/dejagnu7.test b/tests/dejagnu7.test
index 552c2ca..0be4d1f 100755
--- a/tests/dejagnu7.test
+++ b/tests/dejagnu7.test
@@ -29,21 +29,19 @@ cat > failtcl << 'END'
#! /bin/sh
echo whatever
END
-
chmod +x failtcl
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = failtcl
-
AM_RUNTESTFLAGS = --status FAILTCL=$(srcdir)/failtcl
END
mkdir failtcl.test
-
cat > failtcl.test/failtcl.exp << 'END'
set test test
spawn $FAILTCL
@@ -62,3 +60,5 @@ $MAKE check && Exit 1
test -f failtcl.log
test -f failtcl.sum
$FGREP 'missing close-brace' failtcl.sum
+
+:
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
deleted file mode 100755
index 6933d0c..0000000
--- a/tests/help-maintainer.test
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010 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/>.
-
-# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
-# the configure help screen.
-
-. ./defs || Exit 1
-
-set -e
-
-cat > configure.in <<END
-AC_INIT([$me], [1.0])
-AM_MAINTAINER_MODE
-END
-
-cat configure.in
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^ *--enable-maintainer-mode( |$)' stdout
-$FGREP ' enable make rules' stdout
-
-rm -rf autom4te*.cache # just to be sure
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
-mv -f t configure.in
-
-cat configure.in
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^ *--enable-maintainer-mode( |$)' stdout
-$FGREP ' enable make rules' stdout
-
-rm -rf autom4te*.cache # just to be sure
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
-mv -f t configure.in
-
-cat configure.in
-$ACLOCAL
-$AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP '^ *--disable-maintainer-mode( |$)' stdout
-$FGREP ' disable make rules' stdout
-
-:
diff --git a/tests/install-info-dir.test b/tests/install-info-dir.test
new file mode 100755
index 0000000..f75b115
--- /dev/null
+++ b/tests/install-info-dir.test
@@ -0,0 +1,140 @@
+#! /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/>.
+
+# Checks on the `install-info' target.
+# Details about the individual checks' purposes and motivations are
+# inlined, below.
+
+# FIXME: this test is a good candidate for a conversion to TAP,
+# FIXME: and could be merged with `txinfo27.test'.
+
+required=makeinfo
+. ./defs || Exit 1
+
+cwd=`pwd` || fatal_ "cannot get current working directory"
+
+mkdir bin
+saved_PATH=$PATH; export saved_PATH
+PATH=$cwd/bin$PATH_SEPARATOR$PATH; export PATH
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.texi
+END
+
+cat > foo.texi << 'END'
+\input texinfo
address@hidden foo.info
address@hidden Top
+Hello world!
address@hidden
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+instdir=_inst
+destdir=_dest
+
+./configure --prefix="$cwd/$instdir" --infodir="$cwd/$instdir/info"
+
+$MAKE info
+test -f foo.info
+
+if install-info --version; then
+ have_installinfo=yes
+else
+ have_installinfo=no
+fi
+
+# The `install-info' target updates the `${infodir}/dir' file
+# by default (if the `install-info' program is available).
+# This should happen in a normal as well as in a DESTDIR installation.
+if test $have_installinfo = yes; then
+ $MAKE install-info
+ test -f $instdir/info/foo.info
+ test -f $instdir/info/dir
+ $MAKE DESTDIR="$cwd/$destdir" install-info
+ test -f "$destdir/$cwd/$instdir"/info/foo.info
+ test -f "$destdir/$cwd/$instdir"/info/dir
+fi
+
+rm -rf $instdir $destdir
+
+# The `install-info' target doesn't fail if the `install-info'
+# program is not available.
+cat > bin/install-info <<'END'
+#!/bin/sh
+echo error from install-info >&2
+exit 127
+END
+chmod a+x bin/install-info
+$MAKE install-info >output 2>&1 || { cat output; Exit 1; }
+cat output
+test -f $instdir/info/foo.info
+test ! -f $instdir/info/dir
+grep 'error from install-info' output && Exit 1
+
+rm -rf $instdir output
+
+if test $have_installinfo = yes; then
+ # The `install-info' target doesn't try to guess whether the `install-info'
+ # is the GNU or debian version.
+ unindent > bin/install-info <<'END'
+ #!/bin/sh
+ set -e; set -u;
+ for fd in 1 2; do
+ for str in dpkg debian Debian; do
+ eval "echo This is $str install-info >&$fd"
+ done
+ done
+ PATH=$saved_PATH; export PATH
+ exec install-info ${1+"$@"}
+END
+ $MAKE install-info
+ test -f $instdir/info/foo.info
+ test -f $instdir/info/dir
+fi
+
+rm -rf $instdir bin/install-info
+
+# The `AM_UPDATE_INFO_DIR' environment variable can be used to
+# prevent the creation or update of the `${infodir}/dir' file,
+# if set to a "no" value.
+for val in no NO n; do
+ rm -rf $instdir
+ env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
+ test -f $instdir/info/foo.info
+ test ! -f $instdir/info/dir
+done
+if test $have_installinfo = yes; then
+ for val in 'yes' 'who cares!'; do
+ rm -rf $instdir
+ env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
+ test -f $instdir/info/foo.info
+ test -f $instdir/info/dir
+ done
+fi
+
+rm -rf $instdir
+
+:
diff --git a/tests/maintmode-configure-msg.test
b/tests/maintmode-configure-msg.test
new file mode 100755
index 0000000..5771392
--- /dev/null
+++ b/tests/maintmode-configure-msg.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2010, 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/>.
+
+# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
+# the configure help screen. Also make sure the "checking ..." messages
+# related to the enabling/disabling of maintainer mode are correct (see
+# automake bug#9890).
+
+. ./defs || Exit 1
+
+set -e
+
+set_maintmode ()
+{
+ rm -rf autom4te*.cache # Just to be sure not to use a stale cache.
+ echo "AC_INIT([$me], [1.0])" > configure.in
+ case $1 in
+ DEFAULT) echo AM_MAINTAINER_MODE;;
+ *) echo "AM_MAINTAINER_MODE([$*])";;
+ esac >> configure.in
+}
+
+check_configure_message_with ()
+{
+ answer=$1; shift
+ ./configure ${1+"$@"} >stdout || { cat stdout; Exit 1; }
+ cat stdout
+ grep "^checking whether to enable maintainer-specific.*\\.\\.\\. $answer$"
stdout
+ test `grep -c 'checking.*maint' stdout` -eq 1
+ :
+}
+
+set_maintmode "DEFAULT"
+
+$ACLOCAL
+
+$AUTOCONF --force
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^ *--enable-maintainer-mode.* enable make rules' stdout
+
+check_configure_message_with "no"
+check_configure_message_with "yes" --enable-maintainer-mode
+
+set_maintmode "disable"
+
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^ *--enable-maintainer-mode.* enable make rules' stdout
+
+check_configure_message_with "no"
+check_configure_message_with "yes" --enable-maintainer-mode
+
+set_maintmode "enable"
+
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^ *--disable-maintainer-mode.* disable make rules' stdout
+
+check_configure_message_with "yes"
+check_configure_message_with "no" --disable-maintainer-mode
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-589-g91ea62a,
Stefano Lattarini <=