f2590f485b16b00ac0f8bdb2b19959a22a49bfc7
[platform/upstream/automake.git] / tests / instfail-info.test
1 #! /bin/sh
2 # Copyright (C) 2008  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 3, 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 # The install rule should honor failures of the install program.
18 # Some of these are already caught by instmany.test.
19
20 # This test has a few sister tests, for java, info, libtool.
21
22 required='makeinfo'
23 . ./defs || Exit 1
24
25 set -e
26
27 cat >>configure.in <<END
28 AC_OUTPUT
29 END
30
31 cat >Makefile.am <<'END'
32 info_TEXINFOS = info1.texi info2.texi info3.texi
33 END
34
35 for n in 1 2 3; do
36   cat >info$n.texi <<END
37 \input texinfo
38 @setfilename info$n.info
39 @settitle main
40 @node Top
41 Hello walls.
42 @bye
43 END
44 done
45
46 $ACLOCAL
47 $AUTOCONF
48 $AUTOMAKE --add-missing
49
50 instdir=`pwd`/inst
51 ./configure --prefix="$instdir"
52 $MAKE
53
54 $MAKE install
55 $MAKE uninstall
56
57 for file in info1.info
58 do
59   chmod a-r $file
60   test ! -r $file || Exit 77
61   $MAKE install-data && Exit 1
62   chmod u+r $file
63 done
64
65 :