summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-06-16 23:07:00 +0200
committerMathieu Lirzin <mthl@gnu.org>2017-06-16 23:07:00 +0200
commitcc7231cc3668a387ae36905efca11f9d236c8df6 (patch)
treef0cf53f6c41586cabfead192ab344bdf7b16a77b /t
parent1370ce5f83c54df7ef863abb2ade73f3d5ce69e0 (diff)
parentc946ae6f25422d45e54de0fd69309cbb438f942d (diff)
downloadautomake-cc7231cc3668a387ae36905efca11f9d236c8df6.tar.gz
Merge branch 'minor'
Diffstat (limited to 't')
-rw-r--r--t/configure.sh59
-rw-r--r--t/distcheck-Tpo.sh2
-rw-r--r--t/gettext-macros.sh41
-rw-r--r--t/includes-deprecation.sh2
-rw-r--r--t/libobj20a.sh45
-rw-r--r--t/mkdirp-deprecation.sh48
-rw-r--r--t/sourcefile-in-subdir.sh36
-rw-r--r--t/txinfo-no-clutter.sh1
-rw-r--r--t/txinfo19.sh72
-rw-r--r--t/txinfo23.sh69
-rw-r--r--t/txinfo24.sh83
-rw-r--r--t/txinfo25.sh116
-rw-r--r--t/txinfo28.sh89
13 files changed, 635 insertions, 28 deletions
diff --git a/t/configure.sh b/t/configure.sh
new file mode 100644
index 000000000..ae1fd95c3
--- /dev/null
+++ b/t/configure.sh
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2010-2017 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/>.
+
+# Diagnose if the autoconf input is named configure.in.
+# Diagnose if both configure.in and configure.ac are present, prefer
+# configure.ac.
+
+. test-init.sh
+
+cat >configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+EOF
+
+cat >configure.in <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([an-invalid-automake-option])
+AC_CONFIG_FILES([Makefile])
+EOF
+
+: >Makefile.am
+
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'configure\.ac.*configure\.in.*both present' stderr
+
+$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
+
+# Ensure we really proceed with configure.ac.
+AUTOMAKE_fails -Werror
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
+
+AUTOMAKE_run -Wno-error
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
+
+mv -f configure.ac configure.in
+AUTOMAKE_fails
+grep "autoconf input.*'configure.ac', not 'configure.in'" stderr
+
+:
diff --git a/t/distcheck-Tpo.sh b/t/distcheck-Tpo.sh
index 28285ce41..5091e9fd4 100644
--- a/t/distcheck-Tpo.sh
+++ b/t/distcheck-Tpo.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index 34f4e9c0e..a8185af84 100644
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -28,29 +28,20 @@ extract_program_version ()
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
-# The 'gettextize' and 'autopoint' scripts will look into Makefile.am.
+# The 'autopoint' script will look into Makefile.am.
echo AUTOMAKE_OPTIONS = -Wno-obsolete > Makefile.am
echo ACLOCAL_AMFLAGS = -I m4 >> Makefile.am
-# Prefer autopoint to gettextize, since the more modern versions of the
-# latter might unconditionally require user interaction to complete;
-# yes, this means confirmation from /dev/tty (!) -- see:
+# Prefer autopoint to gettextize, since the latter unconditionally
+# requires user interaction to complete; yes, this means confirmation
+# from /dev/tty (!) -- see:
# <http://lists.gnu.org/archive/html/bug-gettext/2011-12/msg00000.html>
-# Since this "forced interaction" behaviour of gettextize wasn't present
-# before the introduction of autopoint, we should be able to safely
-# fall back to calling gettextize non-interactively if autopoint is not
-# present.
-if autopoint --version; then
- am_gettextize_command=autopoint
-else
- am_gettextize_command=gettextize
-fi
-# We will need to specify the correct autopoint (or gettextize) version
-# in the AM_GNU_GETTEXT_VERSION call in configure.ac if we want autopoint
-# (or gettextize) to setup the correct infrastructure -- in particular,
-# for what concerns us, to bring in all the required .m4 files.
-autopoint_version=$(extract_program_version $am_gettextize_command) \
+# We will need to specify the correct autopoint version in the
+# AM_GNU_GETTEXT_VERSION call in configure.ac if we want autopoint to
+# setup the correct infrastructure -- in particular, for what concerns
+# us, to bring in all the required .m4 files.
+autopoint_version=$(extract_program_version autopoint) \
&& test -n "$autopoint_version" \
|| autopoint_version=0.10.35
@@ -62,11 +53,11 @@ AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([$autopoint_version])
END
-if $am_gettextize_command --force && test -f m4/gettext.m4; then
+if autopoint --force && test -f m4/gettext.m4; then
echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
echo "export ACLOCAL_PATH" >> get.sh
else
- # Older versions of gettext might not have a gettextize program
+ # Older versions of gettext might not have an autopoint program
# available, but this doesn't mean the user hasn't made the gettext
# macros available, e.g., by properly setting ACLOCAL_PATH.
rm -rf m4
@@ -94,13 +85,13 @@ $ACLOCAL --force -I m4 || cat >> get.sh <<'END'
ACLOCAL="$ACLOCAL -Wno-syntax"
END
-# Remove any Makefile.in possibly created by gettextize/autopoint, to
-# avoid spurious maintainer-check failures.
+# Remove any Makefile.in possibly created by autopoint, to avoid spurious
+# maintainer-check failures.
rm -f $(find . -name Makefile.in)
-# The file gettextize or autopoint might have copied in the 'm4'
-# subdirectory of the test directory are going to be needed by
-# other tests, so we must not remove the test directory.
+# The file autopoint might have copied in the 'm4' subdirectory of the
+# test directory are going to be needed by other tests, so we must not
+# remove the test directory.
keep_testdirs=yes
:
diff --git a/t/includes-deprecation.sh b/t/includes-deprecation.sh
index 169a0a978..da5300329 100644
--- a/t/includes-deprecation.sh
+++ b/t/includes-deprecation.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2012-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
diff --git a/t/libobj20a.sh b/t/libobj20a.sh
new file mode 100644
index 000000000..39428eaa6
--- /dev/null
+++ b/t/libobj20a.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests 'libobj20b.sh' and 'libobj20c.sh'.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_LIBOBJ([foo])
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+mkdir libobj-dir
+: > libobj-dir/foo.c
+: > ar-lib
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'LIBOBJS.*used outside.*libobj-dir' stderr
+grep 'subdir-objects.*not set' stderr
+
+:
diff --git a/t/mkdirp-deprecation.sh b/t/mkdirp-deprecation.sh
new file mode 100644
index 000000000..5087d678a
--- /dev/null
+++ b/t/mkdirp-deprecation.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 AM_PROG_MKDIR_P macro is deprecated. It will be
+# be removed in the next major Automake release.
+
+. test-init.sh
+
+echo AM_PROG_MKDIR_P >> configure.ac
+: > Makefile.am
+
+grep_err ()
+{
+ loc='^configure.ac:4:'
+ grep "$loc.*AM_PROG_MKDIR_P.*deprecated" stderr
+ grep "$loc.* use .*AC_PROG_MKDIR_P" stderr
+ grep "$loc.* use '\$(MKDIR_P)' instead of '\$(mkdir_p)'.*Makefile" stderr
+}
+
+$ACLOCAL
+
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep_err
+
+$AUTOCONF -Werror -Wno-obsolete
+
+#AUTOMAKE_fails
+#grep_err
+AUTOMAKE_fails --verbose -Wnone -Wobsolete
+grep_err
+
+$AUTOMAKE -Wno-obsolete
+
+:
diff --git a/t/sourcefile-in-subdir.sh b/t/sourcefile-in-subdir.sh
new file mode 100644
index 000000000..b197463ed
--- /dev/null
+++ b/t/sourcefile-in-subdir.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure subdir source file generates explicit dependency.
+
+. test-init.sh
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz widdershins
+zardoz_SOURCES = y.c x/z.c
+widdershins_SOURCES = x/z.c
+END
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-unsupported
+
+grep '^z\.o: x/z\.c$' Makefile.in
+
+:
diff --git a/t/txinfo-no-clutter.sh b/t/txinfo-no-clutter.sh
index 0152390ee..4497161d1 100644
--- a/t/txinfo-no-clutter.sh
+++ b/t/txinfo-no-clutter.sh
@@ -65,7 +65,6 @@ cat > baz.texi << 'END'
@defindex au
@defindex sa
@defindex sb
-@synindex sa sb
@node Top
Hello walls.
@cindex foo
diff --git a/t/txinfo19.sh b/t/txinfo19.sh
new file mode 100644
index 000000000..bc4d916ac
--- /dev/null
+++ b/t/txinfo19.sh
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test support for DJGPP's .iNN info files.
+
+required=makeinfo
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@bye
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure "--infodir=$(pwd)/_inst"
+$MAKE
+
+# Make sure .iNN files are installed.
+: > main.i1
+: > main.i21
+$MAKE install
+test -f _inst/main.i1
+test -f _inst/main.i21
+
+# They should be uninstalled too.
+$MAKE uninstall
+test ! -e _inst/main.i1
+test ! -e _inst/main.i21
+
+# Make sure rebuild rules erase old .iNN files when they run makeinfo.
+$sleep
+touch main.texi
+test -f main.i1
+test -f main.i21
+$MAKE
+test ! -e main.i1
+test ! -e main.i21
+
+# Finally, we also want them erased by maintainer-clean.
+: > main.i7
+: > main.i39
+$MAKE maintainer-clean
+test ! -e main.i7
+test ! -e main.i39
+
+:
diff --git a/t/txinfo23.sh b/t/txinfo23.sh
new file mode 100644
index 000000000..0e61cda1b
--- /dev/null
+++ b/t/txinfo23.sh
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 info files are built in builddir when needed.
+# Test with subdir Texinfo.
+# (Similar to txinfo13.sh, plus DISTCLEANFILES).
+# (See also txinfo24.sh and txinfo25.sh).
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+DISTCLEANFILES = subdir/*.info*
+info_TEXINFOS = subdir/main.texi
+subdir_main_TEXINFOS = subdir/inc.texi
+
+installcheck-local:
+ test -f "$(infodir)/main.info"
+END
+
+mkdir subdir
+
+cat > subdir/main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@include inc.texi
+@bye
+END
+
+cat > subdir/inc.texi << 'END'
+I'm included.
+END
+
+$ACLOCAL
+$AUTOCONF
+
+AUTOMAKE_run --add-missing -Wno-error
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
+mkdir build
+cd build
+../configure
+$MAKE distcheck
+test -f subdir/main.info
+test ! -e ../subdir/main.info
+
+:
diff --git a/t/txinfo24.sh b/t/txinfo24.sh
new file mode 100644
index 000000000..bc248d1fc
--- /dev/null
+++ b/t/txinfo24.sh
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 info files are built in builddir when needed.
+# (Similar to txinfo16.sh, plus CLEANFILES).
+# (See also txinfo23.sh and txinfo25.sh).
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+CLEANFILES = main.info
+info_TEXINFOS = main.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing -Wno-obsolete
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE
+test ! -e ../main.info
+test -f main.info
+
+cd ..
+rm -rf build
+./configure
+$MAKE
+test -f main.info
+
+# Make sure stamp-vti is older that version.texi.
+# (A common situation in a real tree).
+test -f stamp-vti
+test -f version.texi
+$sleep
+touch stamp-vti
+
+$MAKE distclean
+test -f stamp-vti
+test -f version.texi
+
+mkdir build
+cd build
+../configure
+$MAKE
+# main.info should be rebuilt in the current directory.
+test -f main.info
+test ! -e ../main.info
+$MAKE dvi
+test -f main.dvi
+
+$MAKE distcheck
+
+:
diff --git a/t/txinfo25.sh b/t/txinfo25.sh
new file mode 100644
index 000000000..681a5674d
--- /dev/null
+++ b/t/txinfo25.sh
@@ -0,0 +1,116 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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 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.sh, plus CLEANFILES).
+# (See also txinfo23.sh and txinfo24.sh).
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+CLEANFILES = [a-m]*.info
+info_TEXINFOS = main.texi other.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+cat > other.texi << 'END'
+\input texinfo
+@setfilename other.info
+@settitle other
+@node Top
+Hello walls.
+@include version2.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOCONF
+
+AUTOMAKE_fails --add-missing
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
+$AUTOMAKE --add-missing -Wno-obsolete
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f main.info
+test ! -e ../main.info
+test ! -e other.info
+test -f ../other.info
+
+cd ..
+rm -rf build
+./configure
+$MAKE
+test -f main.info
+test -f other.info
+
+# Make sure stamp-vti is older that version.texi.
+# (A common situation in a real tree).
+# This is needed to test the "subtle" issue described below.
+test -f stamp-vti
+test -f version.texi
+test -f stamp-1
+test -f version2.texi
+$sleep
+touch stamp-vti
+touch stamp-1
+
+$MAKE distclean
+test -f stamp-vti
+test -f stamp-1
+test -f version.texi
+test -f version2.texi
+
+mkdir build
+cd build
+../configure
+$MAKE
+# other.info should not be rebuilt in the current directory, since
+# it's up-to-date in $(srcdir).
+# This can be caused by a subtle issue related to VPATH handling
+# of version.texi (see also the comment in texi-vers.am): because
+# stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
+# rule is always triggered. Still that's not a reason for 'make'
+# to think 'version.texi' has been created...
+test -f main.info
+test ! -e other.info
+$MAKE dvi
+test -f main.dvi
+test -f other.dvi
+
+$MAKE distcheck
+
+:
diff --git a/t/txinfo28.sh b/t/txinfo28.sh
new file mode 100644
index 000000000..37a571cc6
--- /dev/null
+++ b/t/txinfo28.sh
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 info files are built in builddir when needed.
+# Similar to txinfo24.sh, but obfuscating filenames with variable
+# references.
+# Report from Ralf Corsepius.
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+# This setting, when honored by GNU ls, used to cause an infinite loop
+# in mdate-sh.
+TIME_STYLE="+%Y-%m-%d %H:%M:%S"
+export TIME_STYLE
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+MA = ma
+IN = in
+PROJ = $(MA)$(IN)
+include fragment.mk
+info_TEXINFOS = ma$(IN).texi
+END
+
+echo 'CLEANFILES = $(PROJ).info' > fragment.mk
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing -Wno-error
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f main.info
+
+cd ..
+rm -rf build
+./configure
+$MAKE
+test -f main.info
+
+# Make sure stamp-vti is older that version.texi.
+# (A common situation in a real tree).
+test -f stamp-vti
+test -f version.texi
+$sleep
+touch stamp-vti
+
+$MAKE distclean
+test -f stamp-vti
+test -f version.texi
+
+mkdir build
+cd build
+../configure
+$MAKE
+# main.info should be rebuilt in the current directory.
+test -f main.info
+test ! -e ../main.info
+$MAKE dvi
+test -f main.dvi
+
+$MAKE distcheck