Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / txinfo18.test
1 #! /bin/sh
2 # Copyright (C) 2002, 2008, 2009, 2011 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 # Make sure we clean index files, even if they are not used at the top-level.
18 # Only *new* indexes need to be declared at the top-level.
19 # PR/375.
20
21 required='makeinfo tex texi2dvi'
22 . ./defs || Exit 1
23
24 set -e
25
26 cat >> configure.in << 'END'
27 AC_OUTPUT
28 END
29
30 cat > Makefile.am << 'END'
31 info_TEXINFOS = main.texi
32 main_TEXINFOS = sub.texi
33 END
34
35 cat > main.texi << 'END'
36 \input texinfo
37 @setfilename main.info
38 @settitle main
39 @defindex au
40 @defindex sa
41 @defindex sb
42 @synindex sa sb
43 @node Top
44 Hello walls.
45 @include sub.texi
46 @bye
47 END
48
49 cat > sub.texi << 'END'
50 @cindex foo
51 foo
52 @pindex bar
53 bar
54 @auindex baz
55 baz
56 @saindex sa
57 sa
58 @sbindex sb
59 sb
60 END
61
62 $ACLOCAL
63 $AUTOMAKE --add-missing
64 $AUTOCONF
65
66 ./configure
67
68 $MAKE dvi
69 ls -l           # for debugging
70 test -f main.sa # sanity check
71 $MAKE clean
72 ls -l           # for debugging
73 test x"`echo main.*`" = x"main.texi"
74
75 TAR_OPTIONS= $MAKE distcheck
76
77 :