source: trunk/essentials/sys-devel/automake-1.9/tests/txinfo21.test

Last change on this file was 3086, checked in by bird, 18 years ago

automake 1.9.6

File size: 2.3 KB
Line 
1#! /bin/sh
2# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3#
4# This file is part of GNU Automake.
5#
6# GNU Automake is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
11# GNU Automake is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with Automake; see the file COPYING. If not, write to
18# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19# Boston, MA 02110-1301, USA.
20
21# Test support for building HTML documentation.
22
23required='makeinfo-html tex'
24. ./defs || exit 1
25
26set -e
27
28cat >>configure.in <<EOF
29AC_CONFIG_FILES([rec/Makefile])
30AC_OUTPUT
31EOF
32
33cat > Makefile.am << 'END'
34SUBDIRS = rec
35info_TEXINFOS = main.texi sub/main.texi
36END
37
38cat > main.texi << 'END'
39\input texinfo
40@setfilename main.info
41@settitle main
42@node Top
43Hello walls.
44@bye
45END
46
47mkdir sub
48mkdir rec
49cp main.texi sub/main.texi
50cp main.texi rec/main.texi
51
52cat > rec/Makefile.am << 'END'
53info_TEXINFOS = main.texi
54END
55
56$ACLOCAL
57$AUTOMAKE --add-missing
58$AUTOCONF
59
60./configure
61
62$MAKE
63
64$sleep
65# Test production of split-per-node HTML.
66$MAKE html
67test -d main.html
68test -d sub/main.html
69test -d rec/main.html
70
71# Rebuilding main.html should cause its timestamp to be updated.
72test `ls -1td main.texi main.html | sed 1q` = main.html
73$sleep
74touch main.texi
75$MAKE html
76test `ls -1td main.texi main.html | sed 1q` = main.html
77
78$MAKE clean
79test ! -d main.html
80test ! -d sub/main.html
81test ! -d rec/main.html
82
83# Test production of a single HTML file.
84MAKEINFOFLAGS=--no-split $MAKE -e html
85test -f main.html
86test -f sub/main.html
87test -f rec/main.html
88$MAKE clean
89test ! -f main.html
90test ! -f sub/main.html
91test ! -f rec/main.html
92
93# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
94cat >>Makefile.am <<\EOF
95AM_MAKEINFOHTMLFLAGS=--no-split
96AM_MAKEINFOFLAGS=--unsupported-option
97EOF
98$AUTOMAKE
99./configure
100$MAKE html
101test -f main.html
102test -f sub/main.html
103test -d rec/main.html
104$MAKE clean
105test ! -f main.html
106test ! -f sub/main.html
107test ! -d rec/main.html
Note: See TracBrowser for help on using the repository browser.