Revert Automake license to GPLv2+.
[platform/upstream/automake.git] / tests / txinfo8.test
1 #! /bin/sh
2 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004  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 cat > configure.in << 'END'
25 AC_INIT
26 AC_CONFIG_AUX_DIR(sub)
27 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
28 AC_OUTPUT(Makefile sub/Makefile)
29 END
30
31 cat > Makefile.am << 'END'
32 info_TEXINFOS = textutils.texi
33 END
34
35 echo '@setfilename textutils.info' > textutils.texi
36
37 test -d sub || mkdir sub
38
39 cat > sub/Makefile.am << 'END'
40 magic:
41         @echo $(DISTFILES)
42 END
43
44 $ACLOCAL || Exit 1
45 $AUTOMAKE -a || Exit 1
46
47 $FGREP -v @SET_MAKE@ sub/Makefile.in > sub/Makefile.sed
48 test -f sub/texinfo.tex &&
49 $MAKE -s -f sub/Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
50 stat=$?
51
52 Exit $stat