Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / txinfo8.test
1 #! /bin/sh
2 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2011 Free Software
3 # Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Test to make sure texinfo.tex is correctly installed and disted by
19 # -a when we're using AC_CONFIG_AUX_DIR.  Bug report by by Per
20 # Cederqvist.
21
22 . ./defs || Exit 1
23
24 set -e
25
26 cat > configure.in << END
27 AC_INIT([$me], [1.0])
28 AC_CONFIG_AUX_DIR([auxdir])
29 AM_INIT_AUTOMAKE
30 AC_CONFIG_FILES([Makefile])
31 AC_OUTPUT
32 END
33
34 cat > Makefile.am << 'END'
35 info_TEXINFOS = textutils.texi
36 .PHONY: test1 test2
37 test1:
38         @echo DISTFILES = $(DISTFILES)
39         echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
40 test2: distdir
41         ls -l $(distdir)/*
42         test -f $(distdir)/auxdir/texinfo.tex
43 END
44
45 echo '@setfilename textutils.info' > textutils.texi
46
47 mkdir auxdir
48
49 $ACLOCAL
50 $AUTOCONF
51 $AUTOMAKE -a
52
53 test -f auxdir/texinfo.tex
54
55 ./configure
56
57 # Create textutils.info by hand, so that we don't have to require
58 # makeinfo.  Also ensure it's really newer than textutils.texi, so
59 # that make won't try to re-create it.
60 $sleep
61 : > textutils.info
62
63 $MAKE test1 test2
64
65 :