[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-595-
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-595-gad748b8 |
Date: |
Tue, 11 Jan 2011 01:25:39 +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=ad748b8323dd2bac0dd61ac17c72ad363c68055c
The branch, master has been updated
via ad748b8323dd2bac0dd61ac17c72ad363c68055c (commit)
via 6f00e5383376ff8acf2a571a1a979a4e188fb9b9 (commit)
via a115c7c75580f71dd6c123bb1cdaa07f742fd3a3 (commit)
via 6318add07d8f2f8507edcfd85461afea77f68a90 (commit)
via 23b41dc75e1423480e5e40d4076dbd36ab7372ee (commit)
via 05e77ab564bd7c8ca73962a46818e5ebe4db65d3 (commit)
via 834dc3a98272e7eb1869e2a1972ac14ea45e0ec0 (commit)
from 405477b5a2ea6d79c30255db14dbb59b84495fb7 (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 ad748b8323dd2bac0dd61ac17c72ad363c68055c
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 11 02:20:19 2011 +0100
tests: texinfo unrecognized extensions
* tests/txinfo-unrecognized-extension.test: New test.
* tests/Makefile.am (TESTS): Update.
commit 6f00e5383376ff8acf2a571a1a979a4e188fb9b9
Merge: 23b41dc a115c7c
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 11 02:07:51 2011 +0100
Merge branch 'maint'
Conflicts:
tests/instdir-texi.test
tests/txinfo22.test
commit a115c7c75580f71dd6c123bb1cdaa07f742fd3a3
Merge: bb528a7 6318add
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 11 01:59:29 2011 +0100
Merge branch 'tests-texinfo' into maint
commit 6318add07d8f2f8507edcfd85461afea77f68a90
Author: Stefano Lattarini <address@hidden>
Date: Fri Dec 24 02:56:35 2010 +0100
Improve, extend and tweak tests on Texinfo support.
* tests/instdir-texi.test: Add a call to `ls -l' after that to
`make', for debugging. When looking for required tools, do not
redirect the output of "$tool --help" to /dev/null, and do not
uselessly run it in a subshell.
* tests/txinfo.test: Rewritten to run autoconf, ./configure and
make. All checks moved into Makefile.am.
* tests/txinfo8.test: Likewise, and modernize the generated
configure.in.
* tests/txinfo2.test: Moved checks into Makefile.am, and other
minor improvements.
* tests/txinfo5.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command.
* tests/txinfo6.test: Likewise, and make grepping of generated
Makefile.in stricter.
* tests/txinfo7.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Do not add unnecessary stuff
to Makefile.am.
* tests/txinfo9.test: Verify that more targets which are expected
to be generated only once really are. Make grepping less strict,
to avoid exposing too much internal details. More minor changes.
* tests/txinfo16.test: Add trailing `:'. Prefer cat over echo
for appending to configure.in. Updated/fixed heading comments.
* tests/txinfo23.test: Likewise, and extended a little by making
it check that no info file is created in the $(srcdir).
* tests/txinfo24.test: Likewise.
* tests/txinfo25.test: Likewise.
* tests/txinfo18.test: Add trailing `:'. Prefer cat over echo
for appending to configure.in. Also, check that index files are
cleaned also by "make clean", not only by "make distclean".
* tests/txinfo22.test: Prefer `$me' over hard-coded test name,
and added trailing `:' command. This testcase also used to check
that automake ignores in-line comments when using variables, but
preserves them in the output; these checks (added in commit
"Release-1-7f-4-g9177ef8") do not really pertain to this test,
so they have been moved ...
* tests/comments-in-var-defn.test: ... into this new test.
* tests/txinfo4.test: Escape literal dots in grep regexps. Add
trailing `:' command.
* tests/txinfo29.test: Likewise. Relax grepping of generated
Makefile.in w.r.t. whitespaces. Prefer `cat' over `echo' to
append to configure.in.
* tests/txinfo3.test: Likewise.
* tests/vtexi.test: Improve grepping of Makefile.in (sometimes
make it stricter, sometimes laxer). Move `set -e' setting just
after the inclusion of ./defs. De-uglify a sed command. Other
minor cosmetic improvements.
* tests/vtexi2.test: Make grepping of Makefile.in stricter. Add
trailing `:' command.
* tests/vtexi3.test: New test on version.texi support.
* tests/vtexi4.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
commit 23b41dc75e1423480e5e40d4076dbd36ab7372ee
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 11 01:10:44 2011 +0100
tests: fix spurious failure in 'tests/yflags-conditional.test'
* tests/yflags-conditional.test: Filter out message "warnings are
treated as errors" from automake stderr, to avoid a false positive
when grepping for extraneous warning messages.
commit 05e77ab564bd7c8ca73962a46818e5ebe4db65d3
Merge: 405477b 834dc3a
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 11 01:00:13 2011 +0100
Merge branch 'yacc-work'
commit 834dc3a98272e7eb1869e2a1972ac14ea45e0ec0
Author: Stefano Lattarini <address@hidden>
Date: Mon Jan 10 15:50:35 2011 +0100
yacc: warn about conditional content in *YFLAGS variables
This commit fixes automake bug#7804.
* automake.in (lang_yacc_target_hook): Warn if any of the relevant
*YFLAGS variables has conditional contents (not only a conditional
definition). Related refactoring.
* NEWS: Updated.
* tests/yflags-conditional.test: Updated and extended.
* tests/yflags-conditional-force.test: New test.
* tests/Makefile.am (TESTS): Updated.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 78 ++++++++++++
NEWS | 3 +
automake.in | 34 ++++--
tests/Makefile.am | 5 +
tests/Makefile.in | 5 +
tests/{txinfo18.test => comments-in-var-defn.test} | 55 ++++-----
tests/instdir-texi.test | 6 +-
...nal.test => txinfo-unrecognized-extension.test} | 30 ++---
tests/txinfo.test | 31 ++++--
tests/txinfo16.test | 11 ++-
tests/txinfo18.test | 16 +++-
tests/txinfo2.test | 22 ++--
tests/txinfo22.test | 21 ++--
tests/txinfo23.test | 14 ++-
tests/txinfo24.test | 10 ++-
tests/txinfo25.test | 15 ++-
tests/txinfo29.test | 17 ++-
tests/txinfo3.test | 14 ++-
tests/txinfo4.test | 7 +-
tests/txinfo5.test | 10 ++-
tests/txinfo6.test | 13 ++-
tests/txinfo7.test | 12 +-
tests/txinfo8.test | 42 ++++---
tests/txinfo9.test | 22 +++-
tests/vtexi.test | 34 +++---
tests/vtexi2.test | 6 +-
tests/vtexi3.test | 124 ++++++++++++++++++++
tests/vtexi4.test | 118 +++++++++++++++++++
tests/yflags-conditional.test | 119 +++++++++++++++++--
tests/yflags-force-conditional.test | 95 +++++++++++++++
30 files changed, 803 insertions(+), 186 deletions(-)
copy tests/{txinfo18.test => comments-in-var-defn.test} (54%)
copy tests/{yflags-conditional.test => txinfo-unrecognized-extension.test}
(60%)
create mode 100755 tests/vtexi3.test
create mode 100755 tests/vtexi4.test
create mode 100755 tests/yflags-force-conditional.test
diff --git a/ChangeLog b/ChangeLog
index 537344d..57c4241 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,81 @@
+2011-01-11 Stefano Lattarini <address@hidden>
+
+ tests: texinfo unrecognized extensions
+ * tests/txinfo-unrecognized-extension.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+ Improve, extend and tweak tests on Texinfo support.
+ * tests/instdir-texi.test: Add a call to `ls -l' after that to
+ `make', for debugging. When looking for required tools, do not
+ redirect the output of "$tool --help" to /dev/null, and do not
+ uselessly run it in a subshell.
+ * tests/txinfo.test: Rewritten to run autoconf, ./configure and
+ make. All checks moved into Makefile.am.
+ * tests/txinfo8.test: Likewise, and modernize the generated
+ configure.in.
+ * tests/txinfo2.test: Moved checks into Makefile.am, and other
+ minor improvements.
+ * tests/txinfo5.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/txinfo6.test: Likewise, and make grepping of generated
+ Makefile.in stricter.
+ * tests/txinfo7.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Do not add unnecessary stuff
+ to Makefile.am.
+ * tests/txinfo9.test: Verify that more targets which are expected
+ to be generated only once really are. Make grepping less strict,
+ to avoid exposing too much internal details. More minor changes.
+ * tests/txinfo16.test: Add trailing `:'. Prefer cat over echo
+ for appending to configure.in. Updated/fixed heading comments.
+ * tests/txinfo23.test: Likewise, and extended a little by making
+ it check that no info file is created in the $(srcdir).
+ * tests/txinfo24.test: Likewise.
+ * tests/txinfo25.test: Likewise.
+ * tests/txinfo18.test: Add trailing `:'. Prefer cat over echo
+ for appending to configure.in. Also, check that index files are
+ cleaned also by "make clean", not only by "make distclean".
+ * tests/txinfo22.test: Prefer `$me' over hard-coded test name,
+ and added trailing `:' command. This testcase also used to check
+ that automake ignores in-line comments when using variables, but
+ preserves them in the output; these checks (added in commit
+ "Release-1-7f-4-g9177ef8") do not really pertain to this test,
+ so they have been moved ...
+ * tests/comments-in-var-defn.test: ... into this new test.
+ * tests/txinfo4.test: Escape literal dots in grep regexps. Add
+ trailing `:' command.
+ * tests/txinfo29.test: Likewise. Relax grepping of generated
+ Makefile.in w.r.t. whitespaces. Prefer `cat' over `echo' to
+ append to configure.in.
+ * tests/txinfo3.test: Likewise.
+ * tests/vtexi.test: Improve grepping of Makefile.in (sometimes
+ make it stricter, sometimes laxer). Move `set -e' setting just
+ after the inclusion of ./defs. De-uglify a sed command. Other
+ minor cosmetic improvements.
+ * tests/vtexi2.test: Make grepping of Makefile.in stricter. Add
+ trailing `:' command.
+ * tests/vtexi3.test: New test on version.texi support.
+ * tests/vtexi4.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2011-01-11 Stefano Lattarini <address@hidden>
+
+ tests: fix spurious failure in 'tests/yflags-conditional.test'
+ * tests/yflags-conditional.test: Filter out message "warnings are
+ treated as errors" from automake stderr, to avoid a false positive
+ when grepping for extraneous warning messages.
+
+2011-01-10 Stefano Lattarini <address@hidden>
+
+ yacc: warn about conditional content in *YFLAGS variables
+ This change fixes automake bug#7804.
+ * automake.in (lang_yacc_target_hook): Warn if any of the relevant
+ *YFLAGS variables has conditional contents (not only a conditional
+ definition). Related refactoring.
+ * NEWS: Updated.
+ * tests/yflags-conditional.test: Updated and extended.
+ * tests/yflags-conditional-force.test: New test.
+ * tests/Makefile.am (TESTS): Updated.
+
2011-01-08 Stefano Lattarini <address@hidden>
yacc: support variable expansions in *YFLAGS definition.
diff --git a/NEWS b/NEWS
index 4cda1bc..417cc5c 100644
--- a/NEWS
+++ b/NEWS
@@ -105,6 +105,9 @@ Bugs fixed in 1.11a:
through other variables, such as in:
foo_opts = -d
AM_YFLAGS = $(foo_opts)
+
+ - Automake now complains if a `*YFLAGS' variable has any conditional
+ content, not only a conditional definition.
New in 1.11:
diff --git a/automake.in b/automake.in
index 3403c96..1d4601b 100644
--- a/automake.in
+++ b/automake.in
@@ -6098,15 +6098,29 @@ sub lang_yacc_target_hook
{
my ($self, $aggregate, $output, $input, %transform) = @_;
- my $flagvar = var ($aggregate . "_YFLAGS");
- my $YFLAGSvar = var ('YFLAGS');
- # We cannot work reliably with conditionally-defined YFLAGS.
- $flagvar->check_defined_unconditionally if $flagvar;
- $YFLAGSvar->check_defined_unconditionally if $YFLAGSvar;
- my @flags = $flagvar ? $flagvar->value_as_list_recursive : ();
- my @YFLAGS = $YFLAGSvar ? $YFLAGSvar->value_as_list_recursive : ();
- if (grep (/^-d$/, @flags) || grep (/^-d$/, @YFLAGS))
- {
+ # If some relevant *YFLAGS variable contains the `-d' flag, we'll
+ # have to to generate special code.
+ my $yflags_contains_minus_d = 0;
+
+ foreach my $pfx ("", "${aggregate}_")
+ {
+ my $yflagsvar = var ("${pfx}YFLAGS");
+ next unless $yflagsvar;
+ # We cannot work reliably with conditionally-defined YFLAGS.
+ if ($yflagsvar->has_conditional_contents)
+ {
+ msg_var ('unsupported', $yflagsvar,
+ "`${pfx}YFLAGS' cannot have conditional contents");
+ }
+ else
+ {
+ $yflags_contains_minus_d = 1
+ if grep (/^-d$/, $yflagsvar->value_as_list_recursive);
+ }
+ }
+
+ if ($yflags_contains_minus_d)
+ {
(my $output_base = $output) =~ s/$KNOWN_EXTENSIONS_PATTERN$//;
my $header = $output_base . '.h';
@@ -6135,7 +6149,7 @@ sub lang_yacc_target_hook
# then we want to remove them with "make clean"; otherwise,
# "make distcheck" will fail.
$clean_files{$header} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN :
CLEAN;
- }
+ }
# See the comment above for $HEADER.
$clean_files{$output} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN :
CLEAN;
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 56253de..5fcb616 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -233,6 +233,7 @@ comment8.test \
comment9.test \
commen10.test \
commen11.test \
+comments-in-var-defn.test \
compile.test \
compile2.test \
compile3.test \
@@ -902,6 +903,7 @@ txinfo30.test \
txinfo31.test \
txinfo32.test \
txinfo33.test \
+txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
unused.test \
@@ -929,6 +931,8 @@ version8.test \
vpath.test \
vtexi.test \
vtexi2.test \
+vtexi3.test \
+vtexi4.test \
warnopts.test \
werror.test \
werror2.test \
@@ -959,6 +963,7 @@ yflags-cmdline-override.test \
yflags-conditional.test \
yflags-d-false-positives.test \
yflags-force-override.test \
+yflags-force-conditional.test \
yflags-var-expand.test \
$(parallel_tests)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 58004e7..591bc19 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -496,6 +496,7 @@ comment8.test \
comment9.test \
commen10.test \
commen11.test \
+comments-in-var-defn.test \
compile.test \
compile2.test \
compile3.test \
@@ -1165,6 +1166,7 @@ txinfo30.test \
txinfo31.test \
txinfo32.test \
txinfo33.test \
+txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
unused.test \
@@ -1192,6 +1194,8 @@ version8.test \
vpath.test \
vtexi.test \
vtexi2.test \
+vtexi3.test \
+vtexi4.test \
warnopts.test \
werror.test \
werror2.test \
@@ -1222,6 +1226,7 @@ yflags-cmdline-override.test \
yflags-conditional.test \
yflags-d-false-positives.test \
yflags-force-override.test \
+yflags-force-conditional.test \
yflags-var-expand.test \
$(parallel_tests)
diff --git a/tests/txinfo18.test b/tests/comments-in-var-defn.test
similarity index 54%
copy from tests/txinfo18.test
copy to tests/comments-in-var-defn.test
index 4df5257..b00ee6b 100755
--- a/tests/txinfo18.test
+++ b/tests/comments-in-var-defn.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc.
+# 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
@@ -14,52 +14,45 @@
# 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 we clean index files, even if they are not used at the top-level.
-# Only *new* indexes need to be declared at the top-level.
-# PR/375.
+# Make sure Automake ignores in-line comments when using variables,
+# but preserve them in the output.
-required='makeinfo tex texi2dvi'
. ./defs || Exit 1
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+# Use a slash in the comment, because automake takes the dirname
+# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR).
cat > Makefile.am << 'END'
+TEXINFO_TEX = tex/texinfo.tex # some comment w/ a slash
info_TEXINFOS = main.texi
-main_TEXINFOS = sub.texi
+.PHONY: test
+test:
+ test tex/texinfo.tex = $(TEXINFO_TEX)
+ test -d '$(am__TEXINFO_TEX_DIR)'
+ case '$(am__TEXINFO_TEX_DIR)' in tex|./tex) :;; *) exit 1;; esac
END
cat > main.texi << 'END'
\input texinfo
@setfilename main.info
address@hidden main
address@hidden au
address@hidden sa
address@hidden sb
address@hidden sa sb
address@hidden Top
-Hello walls.
address@hidden sub.texi
address@hidden
END
-cat > sub.texi << 'END'
address@hidden foo
-foo
address@hidden bar
-bar
address@hidden baz
-baz
address@hidden sa
-sa
address@hidden sb
-sb
-END
+mkdir tex
+: > tex/texinfo.tex
$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
+$AUTOMAKE
+grep TEX Makefile.in # for debugging
+grep '^TEXINFO_TEX *= *tex/texinfo\.tex *# some comment w/ a slash *$'
Makefile.in
+
+$AUTOCONF
./configure
-TAR_OPTIONS= $MAKE distcheck
+$MAKE test
+
+:
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
index b3e3c84..75b6f82 100755
--- a/tests/instdir-texi.test
+++ b/tests/instdir-texi.test
@@ -22,9 +22,8 @@ required='makeinfo-html tex texi2dvi'
set -e
-(dvips --help 2>/dev/null >/dev/null) || Exit 77
-(pdfetex --help 2>/dev/null >/dev/null) ||
- (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+dvips --help || Exit 77
+pdfetex --help || pdftex --help || Exit 77
cat >>configure.in <<'END'
AC_OUTPUT
@@ -54,6 +53,7 @@ mkdir build
cd build
../configure --prefix="$instdir"
$MAKE all dvi ps pdf html
+ls -l
infodir= htmldir= dvidir= psdir= pdfdir=
export infodir htmldir dvidir psdir pdfdir
diff --git a/tests/yflags-conditional.test
b/tests/txinfo-unrecognized-extension.test
similarity index 60%
copy from tests/yflags-conditional.test
copy to tests/txinfo-unrecognized-extension.test
index 8c673b1..94f217f 100755
--- a/tests/yflags-conditional.test
+++ b/tests/txinfo-unrecognized-extension.test
@@ -14,33 +14,27 @@
# 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 automake complains about conditionally-defined *_YFLAGS.
+# Test that automake complains properly when the files with unrecognized
+# extensions are passed to the TEXINFOS primary.
. ./defs || Exit 1
set -e
-cat >> configure.in <<'END'
-AC_PROG_CC
-AC_PROG_YACC
-AM_CONDITIONAL([COND], [:])
+cat > Makefile.am << 'END'
+info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
END
-cat > Makefile.am <<'END'
-bin_PROGRAMS = foo bar
-foo_SOURCES = foo.y
-bar_SOURCES = bar.y
-if COND
-AM_YFLAGS = $(YFLAGS)
-bar_YFLAGS = -v
-endif COND
-END
-
-: > ylwrap
+echo '@setfilename foobar.info' > foobar.foo
+echo '@setfilename bazquux.info' > bazquux.tex
+echo '@setfilename zardoz.info' > zardoz.c
+: > texinfo.tex
$ACLOCAL
AUTOMAKE_fails
-grep "Makefile\.am:5:.*AM_YFLAGS.* defined conditionally" stderr
-grep "Makefile\.am:6:.*bar_YFLAGS.* defined conditionally" stderr
+
+for x in 'foobar\.foo' 'bazquux\.tex' 'zardoz\.c'; do
+ grep "^Makefile\\.am:.* texinfo file .*$x.* unrecognized extension" stderr
+done
:
diff --git a/tests/txinfo.test b/tests/txinfo.test
index 3f1c533..2e94486 100755
--- a/tests/txinfo.test
+++ b/tests/txinfo.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 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
@@ -15,22 +15,35 @@
# 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 ensure texinfo.tex included in distribution. Bug report by
+# Test to ensure texinfo.tex is included in distribution. Bug report by
# Jim Meyering.
. ./defs || Exit 1
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
-magic:
- @echo $(DISTFILES)
+.PHONY: test1 test2
+test1:
+ @echo DISTFILES = $(DISTFILES)
+ echo ' ' $(DISTFILES) ' ' | grep '[ /]texinfo\.tex '
+test2: distdir
+ ls -l $(distdir)
+ test -f $(distdir)/texinfo.tex
END
echo '@setfilename textutils.info' > textutils.texi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test1 test2
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
+:
diff --git a/tests/txinfo16.test b/tests/txinfo16.test
index 66ed686..4c14aba 100755
--- a/tests/txinfo16.test
+++ b/tests/txinfo16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 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
@@ -14,14 +14,17 @@
# 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 info files are not built in $(srcdir).
+# Check that info files are normally built in $(srcdir),
+# not in $(builddir).
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
info_TEXINFOS = main.texi
@@ -86,3 +89,5 @@ $MAKE dvi
test -f main.dvi
$MAKE distcheck
+
+:
diff --git a/tests/txinfo18.test b/tests/txinfo18.test
index 4df5257..8dc8961 100755
--- a/tests/txinfo18.test
+++ b/tests/txinfo18.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2009, 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
@@ -23,7 +23,9 @@ required='makeinfo tex texi2dvi'
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
info_TEXINFOS = main.texi
@@ -62,4 +64,14 @@ $AUTOMAKE --add-missing
$AUTOCONF
./configure
+
+$MAKE dvi
+ls -l # for debugging
+test -f main.sa # sanity check
+$MAKE clean
+ls -l # for debugging
+test x"`echo main.*`" = x"main.texi"
+
TAR_OPTIONS= $MAKE distcheck
+
+:
diff --git a/tests/txinfo2.test b/tests/txinfo2.test
index 2324f57..f51d0b6 100755
--- a/tests/txinfo2.test
+++ b/tests/txinfo2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 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
@@ -21,24 +22,27 @@
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
-magic:
- @echo $(DISTFILES)
+.PHONY: test
+test:
+ @echo DISTFILES = $(DISTFILES)
+ case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac
END
: > texinfo.tex
echo '@setfilename textutils.info' > textutils.texi
: > textutils.info~
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE
+
./configure
-$MAKE magic >stdout
-cat stdout
-grep '~' stdout && Exit 1
-Exit 0
+$MAKE test
+
+:
diff --git a/tests/txinfo22.test b/tests/txinfo22.test
index 4adf473..731e37a 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 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
@@ -16,32 +16,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure the user can override TEXINFO_TEX.
-# Report from Tom Tromey.
-# Also make sure Automake ignores in-line comments when using variables,
-# but preserve them in the output.
# Also make sure TEXINFO_TEX is not distributed.
+# Report from Tom Tromey.
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
set -e
-cat > configure.in << 'END'
-AC_INIT([txinfo22], [1.0])
+cat > configure.in << END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([aux1])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
-# Use a slash in the comment, because automake takes the dirname
-# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR)...
cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex # some comment w/ a slash
+TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
info_TEXINFOS = main.texi
sure_it_exists:
test -f $(TEXINFO_TEX)
- test -d "$(am__TEXINFO_TEX_DIR)"
sure_it_is_not_distributed: distdir
test ! -f $(distdir)/tex/texinfo.tex
END
@@ -68,7 +63,9 @@ test ! -f aux1/texinfo.tex
test -f tex/texinfo.tex
./configure
+
$MAKE sure_it_exists
$MAKE distcheck
-grep 'TEXINFO_TEX = .* # some comment w/ a slash' Makefile
$MAKE sure_it_is_not_distributed
+
+:
diff --git a/tests/txinfo23.test b/tests/txinfo23.test
index 903e681..660487d 100755
--- a/tests/txinfo23.test
+++ b/tests/txinfo23.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 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
@@ -14,15 +14,19 @@
# 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 for subdir Texinfo in $(srcdir).
+# Check that info files are built in builddir when needed.
+# Test with subdir Texinfo.
# (Similar to txinfo13.test, plus DISTCLEANFILES.)
+# (See also txinfo24.test and txinfo25.test)
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
DISTCLEANFILES = subdir/*.info*
@@ -50,7 +54,6 @@ cat > subdir/inc.texi << 'END'
I'm included.
END
-
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
@@ -60,3 +63,6 @@ cd build
../configure
$MAKE distcheck
test -f subdir/main.info
+test ! -f ../subdir/main.info
+
+:
diff --git a/tests/txinfo24.test b/tests/txinfo24.test
index 4c0bc82..fc9f9d1 100755
--- a/tests/txinfo24.test
+++ b/tests/txinfo24.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 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
@@ -16,13 +16,16 @@
# Check that info files are built in builddir when needed.
# (Similar to txinfo16.test, plus CLEANFILES.)
+# (See also txinfo23.test and txinfo25.test)
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
CLEANFILES = main.info
@@ -47,6 +50,7 @@ mkdir build
cd build
../configure
$MAKE
+test ! -f ../main.info
test -f main.info
cd ..
@@ -77,3 +81,5 @@ $MAKE dvi
test -f main.dvi
$MAKE distcheck
+
+:
diff --git a/tests/txinfo25.test b/tests/txinfo25.test
index 85007f9..f80b035 100755
--- a/tests/txinfo25.test
+++ b/tests/txinfo25.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -14,15 +14,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Similar to texinfo24.test, but with two info files, only one of
-# which being cleaned.
+# Check that info files are built in builddir and in srcdir can safely
+# co-exist. This setup is obtained by having two info files, only one
+# of which being cleaned.
+# (Similar to txinfo16.test, plus CLEANFILES.)
+# (See also txinfo23.test and txinfo24.test)
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
CLEANFILES = [a-m]*.info
@@ -104,3 +109,5 @@ test -f main.dvi
test -f other.dvi
$MAKE distcheck
+
+:
diff --git a/tests/txinfo29.test b/tests/txinfo29.test
index 1d4aeff..42dd3ab 100755
--- a/tests/txinfo29.test
+++ b/tests/txinfo29.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 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
@@ -30,7 +30,7 @@ echo '@setfilename baz.info' > bar.texi
$ACLOCAL
AUTOMAKE_fails --add-missing
-grep '^Makefile.am:1:.*user variable.*INFO_DEPS' stderr
+grep '^Makefile\.am:1:.*user variable.*INFO_DEPS' stderr
grep 'overrides Automake variable.*INFO_DEPS' stderr
$AUTOMAKE -Wno-override
@@ -38,19 +38,20 @@ $AUTOMAKE -Wno-override
# There is only one definition of INFO_DEPS
test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
# and it is the right one.
-grep '^INFO_DEPS = foo.info$' Makefile.in
-
+grep '^INFO_DEPS *= *foo.info *$' Makefile.in
# Likewise with AC_SUBST.
cat > Makefile.am << 'END'
info_TEXINFOS = bar.texi
END
-echo 'AC_SUBST([INFO_DEPS])' >>configure.in
+cat >> configure.in << 'END'
+AC_SUBST([INFO_DEPS])
+END
rm -rf autom4te.cache # Make sure autoconf sees the configure.in update.
AUTOMAKE_fails
-grep '^configure.in:4:.*user variable.*INFO_DEPS' stderr
+grep '^configure\.in:4:.*user variable.*INFO_DEPS' stderr
grep 'overrides Automake variable.*INFO_DEPS' stderr
$AUTOMAKE -Wno-override
@@ -58,4 +59,6 @@ $AUTOMAKE -Wno-override
# There is only one definition of INFO_DEPS
test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
# and it is the right one.
-grep '^INFO_DEPS = @address@hidden' Makefile.in
+grep '^INFO_DEPS *= address@hidden@ *$' Makefile.in
+
+:
diff --git a/tests/txinfo3.test b/tests/txinfo3.test
index dcdfcfa..6af712f 100755
--- a/tests/txinfo3.test
+++ b/tests/txinfo3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003, 2008 Free Software Foundation,
-# Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2008, 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
@@ -22,7 +22,9 @@ required='makeinfo tex texi2dvi'
set -e
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
@@ -45,8 +47,10 @@ grep '^INFO_DEPS.*textutils$' Makefile.in
# We should not use single suffix inference rules (with separate
# dependencies), this confuses Solaris make.
-grep '^.texi:$' Makefile.in && Exit 1
-grep 'textutils: textutils.texi' Makefile.in
+grep '^\.texi:$' Makefile.in && Exit 1
+grep 'textutils: *textutils\.texi' Makefile.in
./configure
$MAKE distcheck
+
+:
diff --git a/tests/txinfo4.test b/tests/txinfo4.test
index 1c6a92f..0c55a1c 100755
--- a/tests/txinfo4.test
+++ b/tests/txinfo4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 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
@@ -29,4 +30,6 @@ echo '@setfilename textutils.frob' > textutils.texi
$ACLOCAL
AUTOMAKE_fails
-grep 'textutils.texi:1:.*textutils.frob.*extension' stderr
+grep 'textutils\.texi:1:.*textutils\.frob.*extension' stderr
+
+:
diff --git a/tests/txinfo5.test b/tests/txinfo5.test
index 0bbc7d9..2467113 100755
--- a/tests/txinfo5.test
+++ b/tests/txinfo5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 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
@@ -16,8 +17,11 @@
# Test to make sure that texinfo.tex is not required by --cygnus.
# Report from Ian Taylor.
+
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
END
@@ -28,5 +32,7 @@ END
echo '@setfilename ian.info' > ian.texi
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE --cygnus
+
+:
diff --git a/tests/txinfo6.test b/tests/txinfo6.test
index ad3704e..f5b8c0b 100755
--- a/tests/txinfo6.test
+++ b/tests/txinfo6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 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
@@ -15,8 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure `.txi' extension works.
+
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = foo.txi
END
@@ -24,7 +27,9 @@ END
echo '@setfilename foo.info' > foo.txi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^\.txi\.info: *$' Makefile.in
-$FGREP '.txi.info' Makefile.in
+:
diff --git a/tests/txinfo7.test b/tests/txinfo7.test
index 466a216..9a1dd5c 100755
--- a/tests/txinfo7.test
+++ b/tests/txinfo7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 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
@@ -19,15 +19,17 @@
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
-magic:
- @echo $(DISTFILES)
END
echo '@setfilename textutils.info' > textutils.texi
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
test -f texinfo.tex
+
+:
diff --git a/tests/txinfo8.test b/tests/txinfo8.test
index 7975b28..8dd24a4 100755
--- a/tests/txinfo8.test
+++ b/tests/txinfo8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -21,32 +21,38 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR(sub)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
+.PHONY: test1 test2
+test1:
+ @echo DISTFILES = $(DISTFILES)
+ echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
+test2: distdir
+ ls -l $(distdir)/*
+ test -f $(distdir)/auxdir/texinfo.tex
END
echo '@setfilename textutils.info' > textutils.texi
-test -d sub || mkdir sub
+mkdir auxdir
-cat > sub/Makefile.am << 'END'
-magic:
- @echo $(DISTFILES)
-END
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+test -f auxdir/texinfo.tex
-$FGREP -v @SET_MAKE@ sub/Makefile.in > sub/Makefile.sed
-test -f sub/texinfo.tex &&
-$MAKE -s -f sub/Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
-stat=$?
+./configure
+$MAKE test1 test2
-Exit $stat
+:
diff --git a/tests/txinfo9.test b/tests/txinfo9.test
index b9eb7b5..71b5efb 100755
--- a/tests/txinfo9.test
+++ b/tests/txinfo9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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
@@ -14,12 +14,12 @@
# 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 we only create dist-info target once.
-# This is just an example -- basically for many targets in texinfos.am
-# we only want them to appear once.
+# Make sure we only create texinfo-related targets once.
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = maude.texi liver.txi heart.texinfo
END
@@ -29,7 +29,15 @@ echo '@setfilename liver.info' > liver.txi
echo '@setfilename heart.info' > heart.texinfo
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+# These are just examples -- basically for many targets in texinfos.am
+# we only want them to appear once. But grepping them all would be
+# overkill.
+for t in info dist-info dvi-am install-html uninstall-pdf-am; do
+ $EGREP "(^| )$t*.:" Makefile.in # help in debugging
+ test `$EGREP -c "(^| )$t(:| *.:)" Makefile.in` -eq 1
+done
-test `grep '^dist-info:' Makefile.in | wc -l` -eq 1
+:
diff --git a/tests/vtexi.test b/tests/vtexi.test
index c28a356..e9a4511 100755
--- a/tests/vtexi.test
+++ b/tests/vtexi.test
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 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
@@ -15,8 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Basic checks and some regressions testing on `version.texi'
+# support for texinfo files.
+
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
@@ -30,9 +35,7 @@ END
: > mdate-sh
: > texinfo.tex
-set -e
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
# Test for bug reported by Jim Meyering:
@@ -41,25 +44,22 @@ $AUTOMAKE
# textutils.info: textutils.texi
# instead of
# textutils.info: textutils.texi version.texi
-# (Today this should be `textutils.info: version.texi')
-
-grep 'textutils\.info:.*version\.texi$' Makefile.in
-
+# Today this should be:
+# $(srcdir)/textutils.info: $(srcdir)/version.texi
+# or:
+# $(srcdir)/textutils.info: version.texi
+grep '^\$(srcdir)/textutils\.info:.*[ /]version\.texi *$' Makefile.in
# Test for bug reported by Lars Hecking:
# When running the first version of configure.ac aware automake,
# @CONFIGURE_AC@ was not properly substituted.
-
$EGREP 'stamp-vti:.*textutils\.texi( .*)?$' Makefile.in
$EGREP 'stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
-
# Check that the path to mdate-sh is correct. Over escaping of `$'
# etc. once led to `\$\(srcdir\)/mdate-sh'.
+# Filter out '$(srcdir)/mdate-sh'; there should be no occurrences
+# of `.../mdate-sh' left then.
+sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && Exit 1
-# Filter out '$(srcdir)/mdate-sh'; output occurrences of `SOMETHING/mdate-sh'
-sed -n 's,\$(srcdir)/mdate-sh,,g;s,.* \([^ ]*/mdate-sh\) .*,\1,gp' Makefile.in|
-# There must remain nothing.
- grep . && Exit 1
-
-Exit 0
+:
diff --git a/tests/vtexi2.test b/tests/vtexi2.test
index f6a2bf4..00e4c1e 100755
--- a/tests/vtexi2.test
+++ b/tests/vtexi2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Copyright (C) 1996, 1997, 2001, 2002, 2011 Free Software Foundation,
# Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -40,4 +40,6 @@ END
$ACLOCAL
$AUTOMAKE
-grep '^zardoz\.dvi:' Makefile.in
+grep '^zardoz\.dvi:.*[ /]version.texi' Makefile.in
+
+:
diff --git a/tests/vtexi3.test b/tests/vtexi3.test
new file mode 100755
index 0000000..34f46c5
--- /dev/null
+++ b/tests/vtexi3.test
@@ -0,0 +1,124 @@
+#! /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 vers*.texi files are automatically created and distributed
+# if @included into a texi source. Also check that they correctly contain
+# the @values definitions they are advertised to.
+# See also the related test `vtexi4.test', which does similar checks, but
+# for version.texi only, and requires makeinfo, tex and texi2dvi.
+
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-7.45.3a
+
+# This should work without tex, texinfo or makeinfo
+TEX=false TEXI2DVI=false MAKEINFO=false
+export TEX TEXI2DVI MAKEINFO
+
+cat > configure.in << END
+AC_INIT([$me], [7.45.3a])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foobar.texi quux.texi zardoz.texi
+.PHONY: echo-distfiles
+echo-distfiles:
+ @echo ' ' $(DISTFILES) ' '
+END
+
+cat > foobar.texi << 'END'
address@hidden foobar.info
+random text
address@hidden version.texi
+END
+
+cat > quux.texi << 'END'
address@hidden quux.info
address@hidden version-quux.texi
+random text
+END
+
+cat > zardoz.texi << 'END'
address@hidden zardoz.info
+some randome text
address@hidden vers1a_2b.texi
+more random text
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+cp "$testsrcdir/../lib/mdate-sh" .
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+day='([1-9]|1[0-9]|2[0-9]|3[01])'
+month='(January|February|March|April|May|June|July|August|September|October|November|December)'
+year='20[0-9][0-9]' # Hopefully automake will be obsolete in 80 years ;-)
+date="$day $month $year"
+
+do_check ()
+{
+ # Basename of the vers*.texi file.
+ vfile=$1
+ # The $(srcdir) of the current build.
+ srcdir=$2
+ # The vers*.texi file must be created in $(srcdir).
+ $MAKE $srcdir/$vfile.texi
+ cat $srcdir/$vfile.texi
+ # EDITION and VERSION are synonyms, as per documentation.
+ grep "address@hidden EDITION 7\\.45\\.3a$" $srcdir/$vfile.texi
+ grep "address@hidden VERSION 7\\.45\\.3a$" $srcdir/$vfile.texi
+ # Check that UPDATED seems right, and that UPDATED and UPDATED-MONTH
+ # are consistent.
+ $EGREP "address@hidden UPDATED $date$" $srcdir/$vfile.texi
+ vmonth=`grep 'address@hidden UPDATED ' $srcdir/$vfile.texi | awk '{print $4,
$5}'`
+ grep "address@hidden UPDATED-MONTH $vmonth$" $srcdir/$vfile.texi
+ # Check that the vers*.texi file is distributed according
+ # to $(DISTFILES).
+ $MAKE echo-distfiles # For debugging.
+ $MAKE -s echo-distfiles | grep "[ /]$vfile\\.texi"
+}
+
+mkdir build
+cd build
+../configure
+
+do_check version ..
+do_check version-quux ..
+do_check vers1a_2b ..
+
+# The various $(srcdir)/*.info are required for the distribution
+# and they must be newer than version.texi, so that make won't try
+# to rebuild them.
+$sleep
+touch ../foobar.info
+touch ../quux.info
+touch ../zardoz.info
+# Check that the vers*.texi files are really distributed.
+$MAKE distdir
+ls -l $distdir
+diff ../version.texi $distdir/version.texi
+diff ../version-quux.texi $distdir/version-quux.texi
+diff ../version.texi $distdir/vers1a_2b.texi
+
+:
diff --git a/tests/vtexi4.test b/tests/vtexi4.test
new file mode 100755
index 0000000..3c8ab41
--- /dev/null
+++ b/tests/vtexi4.test
@@ -0,0 +1,118 @@
+#! /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 version.texi file is automatically created and distributed
+# if @included into a texi source. Also check that is correctly defined
+# @values definitions it is advertised to.
+# See also the related test `vtexi3.test', which does similar checks, but
+# for more vers*.texi files, and does not require makeinfo, tex and
+# texi2dvi.
+
+required='makeinfo tex texi2dvi-o'
+. ./defs || Exit 1
+
+set -e
+
+case `LC_ALL=C date '+%u'` in
+ [1-7]) date_is_posix=:;;
+ *) date_is_posx=false;;
+esac
+$date_is_posix \
+ && day=`LC_ALL=C date '+%d'` && test -n "$day" \
+ && month=`LC_ALL=C date '+%B'` && test -n "$month" \
+ && year=`LC_ALL=C date '+%Y'`&& test -n "$year" \
+ || { echo "$me: 'date' is not POSIX-compliant enough"; Exit 77; }
+day=`echo "$day" | sed 's/^0//'`
+
+# This test requires a grep program that can work on non-text input.
+(echo 'x' | grep x) || {
+ echo "$me: grep doesn't work on input that is not pure text" >&2
+ Exit 77
+}
+
+cat > configure.in << END
+AC_INIT([$me], [123.456])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > defs.am <<END
+my_date_rx = $day $month $year
+my_month_rx = $month $year
+my_version_rx = 123\.456
+END
+
+cat > Makefile.am << 'END'
+include defs.am
+info_TEXINFOS = foo.texi
+test-grepinfo:
+## Not useless uses of cat: we only tested that grep worked on
+## non-text input when that's given from a pipe.
+ cat $(srcdir)/foo.info | grep 'GREPVERSION=$(my_version_rx)='
+ cat $(srcdir)/foo.info | grep 'GREPEDITION=$(my_version_rx)='
+ cat $(srcdir)/foo.info | grep 'GREPDATE=$(my_date_rx)='
+ cat $(srcdir)/foo.info | grep 'GREPMONTH=$(my_month_rx)='
+test-distfiles:
+ @echo DISTFILES = $(DISTFILES)
+ echo ' ' $(DISTFILES) ' ' | grep '[ /]version.texi '
+test-distdir: distdir
+ ls -l $(distdir)
+ diff $(srcdir)/version.texi $(distdir)/version.texi
+.PHONY: test-grepinfo test-distfiles test-distdir
+check-local: test-grepinfo test-distfiles test-distdir
+END
+
+cat > foo.texi << 'END'
+\input texinfo
address@hidden %**start of header
address@hidden foo.info
address@hidden Zardoz
address@hidden %**end of header
+
address@hidden Top
address@hidden version.texi
+
address@hidden
+
address@hidden
+
address@hidden
+
address@hidden
+
address@hidden
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE all dvi
+
+# debugging & sanity checks
+ls -l
+cat version.texi
+cat foo.info
+test -f foo.dvi
+
+$MAKE test-grepinfo
+$MAKE test-distfiles
+$MAKE test-distdir
+$MAKE distcheck
+
+:
diff --git a/tests/yflags-conditional.test b/tests/yflags-conditional.test
index 8c673b1..1dcdef9 100755
--- a/tests/yflags-conditional.test
+++ b/tests/yflags-conditional.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/>.
-# Check that automake complains about conditionally-defined *_YFLAGS.
+# Check that automake complains about *_YFLAGS variables which have
+# conditional content.
. ./defs || Exit 1
@@ -22,25 +23,123 @@ set -e
cat >> configure.in <<'END'
AC_PROG_CC
-AC_PROG_YACC
+
+# `YFLAGS' is AC_SUBST'd by AC_PROG_YACC by default, but we
+# don't want this, since it might confuse our error messages.
+# Also, AM_SUBST_NOTMAKE seems not to help about this.
+# So we simply define $(YACC) by hand.
+AC_SUBST([YACC], [yacc])
+
AM_CONDITIONAL([COND], [:])
END
+$ACLOCAL
+
cat > Makefile.am <<'END'
-bin_PROGRAMS = foo bar
+bin_PROGRAMS = foo zardoz
foo_SOURCES = foo.y
-bar_SOURCES = bar.y
+zardoz_SOURCES = zardoz.y
if COND
-AM_YFLAGS = $(YFLAGS)
-bar_YFLAGS = -v
+AM_YFLAGS = -v
+zardoz_YFLAGS = -v
endif COND
END
+cat > Makefile1.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+## dummy comment to keep line count right
+if COND
+YFLAGS = foo
+endif COND
+END
+
+cat > Makefile2.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+AM_YFLAGS = am_yflags
+if COND
+YFLAGS = yflags
+endif COND
+END
+
+cat > Makefile3.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+foo_YFLAGS = foo_yflags
+if COND
+YFLAGS = yflags
+endif COND
+END
+
+cat > Makefile4.am <<'END'
+bin_PROGRAMS = foo zardoz
+
+foo_SOURCES = foo.y
+zardoz_SOURCES = $(foo_SOURCES)
+
+YFLAGS =
+AM_YFLAGS = $(COND_VAR1)
+zardoz_YFLAGS = $(COND_VAR2:z=r)
+
+COND_VAR2 = foo
+if COND
+YFLAGS += -v
+COND_VAR2 += bar
+else !COND
+COND_VAR1 = -d
+endif !COND
+END
+
+cat > Makefile5.am <<'END'
+bin_PROGRAMS = foo zardoz
+foo_SOURCES = foo.y
+zardoz_SOURCES = zardoz.y
+YFLAGS = -v
+AM_YFLAGS = -v
+if COND
+zardoz_YFLAGS = -v
+endif
+END
+
+cat > Makefile6.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+foo_YFLAGS = -v
+if COND
+quux_YFLAGS = -v
+AM_YFLAGS = -v
+endif
+END
+
: > ylwrap
-$ACLOCAL
-AUTOMAKE_fails
-grep "Makefile\.am:5:.*AM_YFLAGS.* defined conditionally" stderr
-grep "Makefile\.am:6:.*bar_YFLAGS.* defined conditionally" stderr
+LC_ALL=C; export LC_ALL # For grep regexes below.
+
+AUTOMAKE_fails -Wnone -Wunsupported Makefile
+grep '^Makefile\.am:5:.*AM_YFLAGS.* conditional contents' stderr
+grep '^Makefile\.am:6:.*zardoz_YFLAGS.* conditional contents' stderr
+
+for i in 1 2 3; do
+ AUTOMAKE_fails -Wnone -Wunsupported Makefile$i
+ grep "^Makefile$i\\.am:5:.*[^a-zA-Z0-9_]YFLAGS.* conditional contents" \
+ stderr
+done
+
+AUTOMAKE_fails -Wnone -Wunsupported Makefile4
+grep '^Makefile4\.am:6:.*[^a-zA-Z0-9_]YFLAGS.* conditional contents' stderr
+grep '^Makefile4\.am:7:.*AM_YFLAGS.* conditional contents' stderr
+grep '^Makefile4\.am:8:.*zardoz_YFLAGS.* conditional contents' stderr
+
+# Now let's check we avoid false positives.
+
+# Disable `gnu' warnings because we override the user variable `YFLAGS'.
+AUTOMAKE_fails -Wno-gnu Makefile5
+grep -v '^Makefile5\.am:.*zardoz_YFLAGS' stderr \
+ | grep -v ': warnings are treated as errors' \
+ | grep . && Exit 1
+
+# Disable `gnu' warnings because we override the user variable `YFLAGS'.
+$AUTOMAKE -Wno-gnu Makefile6
:
diff --git a/tests/yflags-force-conditional.test
b/tests/yflags-force-conditional.test
new file mode 100755
index 0000000..65f3197
--- /dev/null
+++ b/tests/yflags-force-conditional.test
@@ -0,0 +1,95 @@
+#! /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 force automake to use *_YFLAGS variables
+# which have conditional content.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_YACC
+AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
+AC_OUTPUT
+END
+
+mkdir bin
+cat > bin/fake-yacc <<'END'
+#!/bin/sh
+echo "/* $* */" > y.tab.c
+echo 'extern int dummy;' >> y.tab.c
+END
+chmod a+x bin/fake-yacc
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+YACC=fake-yacc; export YACC
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.y main.c
+bar_SOURCES = $(foo_SOURCES)
+bar_YFLAGS = $(bar_yflags2)
+if COND
+AM_YFLAGS = __am_cond_yes__
+bar_YFLAGS += __bar_cond_yes__
+else !COND
+AM_YFLAGS = __am_cond_no__
+bar_yflags2 = __bar_cond_no__
+endif !COND
+END
+
+cat > main.c <<'END'
+int main (void)
+{
+ return 0;
+}
+END
+
+: > foo.y
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a -Wno-unsupported
+
+$EGREP '(YFLAGS|yflags|am__append)' Makefile.in # For debugging.
+
+./configure cond=yes
+$MAKE
+
+ls -l
+cat foo.c
+cat bar-foo.c
+
+$FGREP ' __am_cond_yes__ ' foo.c
+$FGREP ' __bar_cond_yes__ ' bar-foo.c
+$FGREP 'cond_no' foo.c bar-foo.c && Exit 1
+
+$MAKE maintainer-clean
+ls -l
+
+./configure cond=no
+$MAKE
+
+ls -l
+cat foo.c
+cat bar-foo.c
+
+$FGREP ' __am_cond_no__ ' foo.c
+$FGREP ' __bar_cond_no__ ' bar-foo.c
+$FGREP 'cond_yes' foo.c bar-foo.c && Exit 1
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-595-gad748b8,
Stefano Lattarini <=