Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / txinfo24.test
1 #! /bin/sh
2 # Copyright (C) 2002, 2003, 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 # Check that info files are built in builddir when needed.
18 # (Similar to txinfo16.test, plus CLEANFILES.)
19 # (See also txinfo23.test and txinfo25.test)
20
21 required='makeinfo tex texi2dvi-o'
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 CLEANFILES = main.info
32 info_TEXINFOS = main.texi
33 END
34
35 cat > main.texi << 'END'
36 \input texinfo
37 @setfilename main.info
38 @settitle main
39 @node Top
40 Hello walls.
41 @include version.texi
42 @bye
43 END
44
45 $ACLOCAL
46 $AUTOMAKE --add-missing
47 $AUTOCONF
48
49 mkdir build
50 cd build
51 ../configure
52 $MAKE
53 test ! -f ../main.info
54 test -f main.info
55
56 cd ..
57 rm -rf build
58 ./configure
59 $MAKE
60 test -f main.info
61
62 # Make sure stamp-vti is older that version.texi.
63 # (A common situation in a real tree.)
64 test -f stamp-vti
65 test -f version.texi
66 $sleep
67 touch stamp-vti
68
69 $MAKE distclean
70 test -f stamp-vti
71 test -f version.texi
72
73 mkdir build
74 cd build
75 ../configure
76 $MAKE
77 # main.info should be rebuilt in the current directory
78 test -f main.info
79 test ! -f ../main.info
80 $MAKE dvi
81 test -f main.dvi
82
83 $MAKE distcheck
84
85 :