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 |
|
---|
23 | required='makeinfo-html tex'
|
---|
24 | . ./defs || exit 1
|
---|
25 |
|
---|
26 | set -e
|
---|
27 |
|
---|
28 | cat >>configure.in <<EOF
|
---|
29 | AC_CONFIG_FILES([rec/Makefile])
|
---|
30 | AC_OUTPUT
|
---|
31 | EOF
|
---|
32 |
|
---|
33 | cat > Makefile.am << 'END'
|
---|
34 | SUBDIRS = rec
|
---|
35 | info_TEXINFOS = main.texi sub/main.texi
|
---|
36 | END
|
---|
37 |
|
---|
38 | cat > main.texi << 'END'
|
---|
39 | \input texinfo
|
---|
40 | @setfilename main.info
|
---|
41 | @settitle main
|
---|
42 | @node Top
|
---|
43 | Hello walls.
|
---|
44 | @bye
|
---|
45 | END
|
---|
46 |
|
---|
47 | mkdir sub
|
---|
48 | mkdir rec
|
---|
49 | cp main.texi sub/main.texi
|
---|
50 | cp main.texi rec/main.texi
|
---|
51 |
|
---|
52 | cat > rec/Makefile.am << 'END'
|
---|
53 | info_TEXINFOS = main.texi
|
---|
54 | END
|
---|
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
|
---|
67 | test -d main.html
|
---|
68 | test -d sub/main.html
|
---|
69 | test -d rec/main.html
|
---|
70 |
|
---|
71 | # Rebuilding main.html should cause its timestamp to be updated.
|
---|
72 | test `ls -1td main.texi main.html | sed 1q` = main.html
|
---|
73 | $sleep
|
---|
74 | touch main.texi
|
---|
75 | $MAKE html
|
---|
76 | test `ls -1td main.texi main.html | sed 1q` = main.html
|
---|
77 |
|
---|
78 | $MAKE clean
|
---|
79 | test ! -d main.html
|
---|
80 | test ! -d sub/main.html
|
---|
81 | test ! -d rec/main.html
|
---|
82 |
|
---|
83 | # Test production of a single HTML file.
|
---|
84 | MAKEINFOFLAGS=--no-split $MAKE -e html
|
---|
85 | test -f main.html
|
---|
86 | test -f sub/main.html
|
---|
87 | test -f rec/main.html
|
---|
88 | $MAKE clean
|
---|
89 | test ! -f main.html
|
---|
90 | test ! -f sub/main.html
|
---|
91 | test ! -f rec/main.html
|
---|
92 |
|
---|
93 | # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
|
---|
94 | cat >>Makefile.am <<\EOF
|
---|
95 | AM_MAKEINFOHTMLFLAGS=--no-split
|
---|
96 | AM_MAKEINFOFLAGS=--unsupported-option
|
---|
97 | EOF
|
---|
98 | $AUTOMAKE
|
---|
99 | ./configure
|
---|
100 | $MAKE html
|
---|
101 | test -f main.html
|
---|
102 | test -f sub/main.html
|
---|
103 | test -d rec/main.html
|
---|
104 | $MAKE clean
|
---|
105 | test ! -f main.html
|
---|
106 | test ! -f sub/main.html
|
---|
107 | test ! -d rec/main.html
|
---|