automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-272-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-272-g73b74f8
Date: Tue, 11 Jan 2011 01:39:17 +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=73b74f839340b94dad94f090e7d8291064104d0d

The branch, maint has been updated
       via  73b74f839340b94dad94f090e7d8291064104d0d (commit)
       via  a115c7c75580f71dd6c123bb1cdaa07f742fd3a3 (commit)
       via  6318add07d8f2f8507edcfd85461afea77f68a90 (commit)
      from  ece3872f817855afd265b3a2187116b253439de0 (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 73b74f839340b94dad94f090e7d8291064104d0d
Merge: a115c7c ece3872
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jan 11 02:27:30 2011 +0100

    Merge branch 'maint' of ssh://git.sv.gnu.org/srv/git/automake into maint
    
    Apparently I messed up doing a previous 'git pull', so that the "latest"
    maint I've merged into master (and pushed!) wasn't a fast-forward from
    origin/maint.  Yay for me.  This merge should help cleaning up the mess.

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

Summary of changes:
 ChangeLog                                          |   55 +++++++++
 tests/Makefile.am                                  |    3 +
 tests/Makefile.in                                  |    3 +
 tests/{txinfo18.test => comments-in-var-defn.test} |   55 ++++-----
 tests/instdir-texi.test                            |    9 +-
 tests/txinfo.test                                  |   31 ++++--
 tests/txinfo16.test                                |   11 ++-
 tests/txinfo18.test                                |   16 +++-
 tests/txinfo2.test                                 |   22 ++--
 tests/txinfo22.test                                |   20 ++--
 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 +++++++++++++++++++
 25 files changed, 535 insertions(+), 148 deletions(-)
 copy tests/{txinfo18.test => comments-in-var-defn.test} (54%)
 create mode 100755 tests/vtexi3.test
 create mode 100755 tests/vtexi4.test

diff --git a/ChangeLog b/ChangeLog
index 4bc6e20..1ec0355 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+2011-01-11  Stefano Lattarini  <address@hidden>
+
+       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-09  Peter Rosin  <address@hidden>
 
        Fix another typo in Rule.pm comment.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8842be3..ceb503b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -158,6 +158,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-defn.test \
 compile.test \
 compile2.test \
 compile_f90_c_cxx.test \
@@ -786,6 +787,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3bc4415..7ecfcaa 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -425,6 +425,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-defn.test \
 compile.test \
 compile2.test \
 compile_f90_c_cxx.test \
@@ -1053,6 +1054,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
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 50617c8..8210535 100755
--- a/tests/instdir-texi.test
+++ b/tests/instdir-texi.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -20,9 +20,8 @@
 required='makeinfo-html tex texi2dvi'
 . ./defs || Exit 1
 
-(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
 
 set -e
 
@@ -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
@@ -67,4 +67,5 @@ $MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'rm -f' stdout && Exit 1
 $MAKE -e uninstall DESTDIR="$destdir"
+
 :
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 3c2265d..c2f23e1 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 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
@@ -15,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
@@ -67,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
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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