Revert Automake license to GPLv2+.
[platform/upstream/automake.git] / tests / txinfo24.test
1 #! /bin/sh
2 # Copyright (C) 2002, 2003  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
20 required='makeinfo tex texi2dvi-o'
21 . ./defs || Exit 1
22
23 set -e
24
25 echo AC_OUTPUT >> configure.in
26
27 cat > Makefile.am << 'END'
28 CLEANFILES = main.info
29 info_TEXINFOS = main.texi
30 END
31
32 cat > main.texi << 'END'
33 \input texinfo
34 @setfilename main.info
35 @settitle main
36 @node Top
37 Hello walls.
38 @include version.texi
39 @bye
40 END
41
42 $ACLOCAL
43 $AUTOMAKE --add-missing
44 $AUTOCONF
45
46 mkdir build
47 cd build
48 ../configure
49 $MAKE
50 test -f main.info
51
52 cd ..
53 rm -rf build
54 ./configure
55 $MAKE
56 test -f main.info
57
58 # Make sure stamp-vti is older that version.texi.
59 # (A common situation in a real tree.)
60 test -f stamp-vti
61 test -f version.texi
62 $sleep
63 touch stamp-vti
64
65 $MAKE distclean
66 test -f stamp-vti
67 test -f version.texi
68
69 mkdir build
70 cd build
71 ../configure
72 $MAKE
73 # main.info should be rebuilt in the current directory
74 test -f main.info
75 test ! -f ../main.info
76 $MAKE dvi
77 test -f main.dvi
78
79 $MAKE distcheck