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

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

automake 1.10

File size: 4.3 KB
Line 
1#! /bin/sh
2# Copyright (C) 2003, 2004, 2006 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, and the many
22# install-DOC flavors.
23
24required='makeinfo-html tex'
25. ./defs || exit 1
26
27set -e
28
29cat >>configure.in <<\EOF
30AC_CONFIG_FILES([rec/Makefile])
31
32# At the time of writing, Autoconf does not supplies any of these
33# definitions (and those below are purposedly not those of the standard).
34AC_SUBST([dvidir], ['${datadir}/${PACKAGE}/dvi'])
35AC_SUBST([htmldir], ['${datadir}/${PACKAGE}/html'])
36AC_SUBST([pdfdir], ['${datadir}/${PACKAGE}/pdf'])
37AC_SUBST([psdir], ['${datadir}/${PACKAGE}/ps'])
38
39AC_OUTPUT
40EOF
41
42cat > Makefile.am << 'END'
43SUBDIRS = rec
44info_TEXINFOS = main.texi sub/main2.texi
45END
46
47cat > main.texi << 'END'
48\input texinfo
49@setfilename main.info
50@settitle main
51@node Top
52Hello walls.
53@bye
54END
55
56mkdir sub
57cat > sub/main2.texi << 'END'
58\input texinfo
59@setfilename main2.info
60@settitle main2
61@node Top
62Hello walls.
63@bye
64END
65
66mkdir rec
67cat > rec/main3.texi << 'END'
68\input texinfo
69@setfilename main3.info
70@settitle main3
71@node Top
72Hello walls.
73@bye
74END
75
76cat > rec/Makefile.am << 'END'
77info_TEXINFOS = main3.texi
78
79install-pdf-local:
80 @$(MKDIR_P) "$(pdfdir)"
81 :> "$(pdfdir)/hello"
82uninstall-local:
83 rm -f "$(pdfdir)/hello"
84END
85
86$ACLOCAL
87$AUTOMAKE --add-missing
88$AUTOCONF
89
90./configure
91
92$MAKE
93
94$sleep
95# Test production of split-per-node HTML.
96$MAKE html
97test -d main.html
98test -d sub/main2.html
99test -d rec/main3.html
100
101# Rebuilding main.html should cause its timestamp to be updated.
102test `ls -1td main.texi main.html | sed 1q` = main.html
103$sleep
104touch main.texi
105$MAKE html
106test `ls -1td main.texi main.html | sed 1q` = main.html
107
108$MAKE clean
109test ! -d main.html
110test ! -d sub/main2.html
111test ! -d rec/main3.html
112
113# Test production of a single HTML file.
114MAKEINFOFLAGS=--no-split $MAKE -e html
115test -f main.html
116test -f sub/main2.html
117test -f rec/main3.html
118$MAKE clean
119test ! -f main.html
120test ! -f sub/main2.html
121test ! -f rec/main3.html
122
123# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
124cat >>Makefile.am <<\EOF
125AM_MAKEINFOHTMLFLAGS=--no-split
126AM_MAKEINFOFLAGS=--unsupported-option
127EOF
128$AUTOMAKE
129./configure --prefix "`pwd`"
130$MAKE html
131test -f main.html
132test -f sub/main2.html
133test -d rec/main3.html
134$MAKE clean
135test ! -f main.html
136test ! -f sub/main2.html
137test ! -d rec/main3.html
138
139$MAKE install-html
140test -f share/txinfo21/html/main.html
141test -f share/txinfo21/html/main2.html
142test -d share/txinfo21/html/main3.html
143$MAKE uninstall
144test ! -f share/txinfo21/html/main.html
145test ! -f share/txinfo21/html/main2.html
146test ! -d share/txinfo21/html/main3.html
147
148$MAKE install-dvi
149test -f share/txinfo21/dvi/main.dvi
150test -f share/txinfo21/dvi/main2.dvi
151test -f share/txinfo21/dvi/main3.dvi
152$MAKE uninstall
153test ! -f share/txinfo21/dvi/main.dvi
154test ! -f share/txinfo21/dvi/main2.dvi
155test ! -f share/txinfo21/dvi/main3.dvi
156
157(dvips --help 2>/dev/null >/dev/null) || exit 77
158
159$MAKE install-ps
160test -f share/txinfo21/ps/main.ps
161test -f share/txinfo21/ps/main2.ps
162test -f share/txinfo21/ps/main3.ps
163$MAKE uninstall
164test ! -f share/txinfo21/ps/main.ps
165test ! -f share/txinfo21/ps/main2.ps
166test ! -f share/txinfo21/ps/main3.ps
167
168(pdfetex --help 2>/dev/null >/dev/null) ||
169 (pdftex --help 2>/dev/null >/dev/null) || exit 77
170
171$MAKE install-pdf
172test -f share/txinfo21/pdf/main.pdf
173test -f share/txinfo21/pdf/main2.pdf
174test -f share/txinfo21/pdf/main3.pdf
175test -f share/txinfo21/pdf/hello
176$MAKE uninstall
177test ! -f share/txinfo21/pdf/main.pdf
178test ! -f share/txinfo21/pdf/main2.pdf
179test ! -f share/txinfo21/pdf/main3.pdf
180test ! -f share/txinfo21/pdf/hello
Note: See TracBrowser for help on using the repository browser.