2 # Copyright (C) 2003-2012 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 2, 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'
23 cat >>configure.
in <<\EOF
24 AC_CONFIG_FILES
([rec
/Makefile
])
26 # At the time of writing, Autoconf does not supplies any of these
27 # definitions (and those below are purposely not those of the standard).
28 AC_SUBST
([dvidir
], ['${datadir}/${PACKAGE}/dvi'])
29 AC_SUBST
([htmldir
], ['${datadir}/${PACKAGE}/html'])
30 AC_SUBST
([pdfdir
], ['${datadir}/${PACKAGE}/pdf'])
31 AC_SUBST
([psdir
], ['${datadir}/${PACKAGE}/ps'])
36 cat > Makefile.am
<< 'END'
38 info_TEXINFOS
= main.texi sub
/main2.texi
41 cat > main.texi
<< 'END'
43 @setfilename main.info
51 cat > sub
/main2.texi
<< 'END'
53 @setfilename main2.info
61 cat > rec
/main3.texi
<< 'END'
63 @setfilename main3.info
70 cat > rec
/Makefile.am
<< 'END'
71 info_TEXINFOS
= main3.texi
74 @$
(MKDIR_P
) "$(pdfdir)"
77 rm -f "$(pdfdir)/hello"
81 $AUTOMAKE --add-missing
89 # Test production of split-per-node HTML.
92 test -d sub
/main2.html
93 test -d rec
/main3.html
95 # Rebuilding main.html should cause its timestamp to be updated.
96 is_newest main.html main.texi
100 is_newest main.html main.texi
104 test ! -d sub
/main2.html
105 test ! -d rec
/main3.html
107 # Test production of a single HTML file.
108 MAKEINFOFLAGS
=--no-split $MAKE -e html
110 test -f sub
/main2.html
111 test -f rec
/main3.html
114 test ! -f sub
/main2.html
115 test ! -f rec
/main3.html
117 # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
118 cat >>Makefile.am
<<\EOF
119 AM_MAKEINFOHTMLFLAGS
= --no-headers --no-split
120 AM_MAKEINFOFLAGS
= --unsupported-option
123 .
/configure
--prefix "`pwd`"
126 test -f sub
/main2.html
127 test -d rec
/main3.html
130 test ! -f sub
/main2.html
131 test ! -d rec
/main3.html
134 test -f share
/$me/html
/main.html
135 test -f share
/$me/html
/main2.html
136 test -d share
/$me/html
/main3.html
138 test ! -f share
/$me/html
/main.html
139 test ! -f share
/$me/html
/main2.html
140 test ! -d share
/$me/html
/main3.html
143 test -f share
/$me/dvi
/main.dvi
144 test -f share
/$me/dvi
/main2.dvi
145 test -f share
/$me/dvi
/main3.dvi
147 test ! -f share
/$me/dvi
/main.dvi
148 test ! -f share
/$me/dvi
/main2.dvi
149 test ! -f share
/$me/dvi
/main3.dvi
151 dvips
--help || skip_
"dvips is missing"
154 test -f share
/$me/ps
/main.ps
155 test -f share
/$me/ps
/main2.ps
156 test -f share
/$me/ps
/main3.ps
158 test ! -f share
/$me/ps
/main.ps
159 test ! -f share
/$me/ps
/main2.ps
160 test ! -f share
/$me/ps
/main3.ps
162 pdfetex
--help || pdftex
--help \
163 || skip_
"pdftex and pdfetex are both missing"
166 test -f share
/$me/pdf
/main.pdf
167 test -f share
/$me/pdf
/main2.pdf
168 test -f share
/$me/pdf
/main3.pdf
169 test -f share
/$me/pdf
/hello
171 test ! -f share
/$me/pdf
/main.pdf
172 test ! -f share
/$me/pdf
/main2.pdf
173 test ! -f share
/$me/pdf
/main3.pdf
174 test ! -f share
/$me/pdf
/hello