2 # Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
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)
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.
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/>.
17 # Test support for building HTML documentation, and the many
18 # install-DOC flavors.
20 required='makeinfo-html tex texi2dvi'
25 cat >>configure.in <<\EOF
26 AC_CONFIG_FILES([rec/Makefile])
28 # At the time of writing, Autoconf does not supplies any of these
29 # definitions (and those below are purposedly not those of the standard).
30 AC_SUBST([dvidir], ['${datadir}/${PACKAGE}/dvi'])
31 AC_SUBST([htmldir], ['${datadir}/${PACKAGE}/html'])
32 AC_SUBST([pdfdir], ['${datadir}/${PACKAGE}/pdf'])
33 AC_SUBST([psdir], ['${datadir}/${PACKAGE}/ps'])
38 cat > Makefile.am << 'END'
40 info_TEXINFOS = main.texi sub/main2.texi
43 cat > main.texi << 'END'
45 @setfilename main.info
53 cat > sub/main2.texi << 'END'
55 @setfilename main2.info
63 cat > rec/main3.texi << 'END'
65 @setfilename main3.info
72 cat > rec/Makefile.am << 'END'
73 info_TEXINFOS = main3.texi
76 @$(MKDIR_P) "$(pdfdir)"
79 rm -f "$(pdfdir)/hello"
83 $AUTOMAKE --add-missing
91 # Test production of split-per-node HTML.
94 test -d sub/main2.html
95 test -d rec/main3.html
97 # Rebuilding main.html should cause its timestamp to be updated.
98 test `ls -1td main.texi main.html | sed 1q` = main.html
102 test `ls -1td main.texi main.html | sed 1q` = main.html
106 test ! -d sub/main2.html
107 test ! -d rec/main3.html
109 # Test production of a single HTML file.
110 MAKEINFOFLAGS=--no-split $MAKE -e html
112 test -f sub/main2.html
113 test -f rec/main3.html
116 test ! -f sub/main2.html
117 test ! -f rec/main3.html
119 # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
120 cat >>Makefile.am <<\EOF
121 AM_MAKEINFOHTMLFLAGS=--no-split
122 AM_MAKEINFOFLAGS=--unsupported-option
125 ./configure --prefix "`pwd`"
128 test -f sub/main2.html
129 test -d rec/main3.html
132 test ! -f sub/main2.html
133 test ! -d rec/main3.html
136 test -f share/txinfo21/html/main.html
137 test -f share/txinfo21/html/main2.html
138 test -d share/txinfo21/html/main3.html
140 test ! -f share/txinfo21/html/main.html
141 test ! -f share/txinfo21/html/main2.html
142 test ! -d share/txinfo21/html/main3.html
145 test -f share/txinfo21/dvi/main.dvi
146 test -f share/txinfo21/dvi/main2.dvi
147 test -f share/txinfo21/dvi/main3.dvi
149 test ! -f share/txinfo21/dvi/main.dvi
150 test ! -f share/txinfo21/dvi/main2.dvi
151 test ! -f share/txinfo21/dvi/main3.dvi
153 (dvips --help 2>/dev/null >/dev/null) || Exit 77
156 test -f share/txinfo21/ps/main.ps
157 test -f share/txinfo21/ps/main2.ps
158 test -f share/txinfo21/ps/main3.ps
160 test ! -f share/txinfo21/ps/main.ps
161 test ! -f share/txinfo21/ps/main2.ps
162 test ! -f share/txinfo21/ps/main3.ps
164 (pdfetex --help 2>/dev/null >/dev/null) ||
165 (pdftex --help 2>/dev/null >/dev/null) || Exit 77
168 test -f share/txinfo21/pdf/main.pdf
169 test -f share/txinfo21/pdf/main2.pdf
170 test -f share/txinfo21/pdf/main3.pdf
171 test -f share/txinfo21/pdf/hello
173 test ! -f share/txinfo21/pdf/main.pdf
174 test ! -f share/txinfo21/pdf/main2.pdf
175 test ! -f share/txinfo21/pdf/main3.pdf
176 test ! -f share/txinfo21/pdf/hello