maint: Update HACKING
[automake.git] / t / txinfo-clean.sh
blob9c1a230985f42691b725be0c7828643459e4babf
1 #! /bin/sh
2 # Copyright (C) 2003-2017 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)
7 # any later version.
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 <https://www.gnu.org/licenses/>.
17 # DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
18 # Similar to txinfo25.sh.
20 required='makeinfo tex texi2dvi dvips'
21 . test-init.sh
23 mkdir sub
25 cat >> configure.ac << 'END'
26 AC_OUTPUT
27 END
29 cat > Makefile.am << 'END'
30 info_TEXINFOS = main.texi other.texi sub/another.texi
31 END
33 cat > main.texi << 'END'
34 \input texinfo
35 @setfilename main.info
36 @settitle main
37 @node Top
38 Hello walls.
39 @include version.texi
40 @bye
41 END
43 cat > other.texi << 'END'
44 \input texinfo
45 @setfilename other.info
46 @settitle other
47 @node Top
48 Hello walls.
49 @include version2.texi
50 @bye
51 END
53 cat > sub/another.texi << 'END'
54 \input texinfo
55 @setfilename another.info
56 @settitle another
57 @node Top
58 Hello walls.
59 @include version3.texi
60 @bye
61 END
63 $ACLOCAL
64 $AUTOMAKE --add-missing
65 $AUTOCONF
67 # In-tree build.
68 ./configure
69 $MAKE dvi ps pdf html
71 test -f main.dvi
72 test -f main.ps
73 test -f main.html || test -d main.html
74 test -f main.pdf
75 test -f other.pdf
76 test -f sub/another.pdf
78 test -f other.dvi
79 test -f other.html || test -d other.html
80 test -f other.ps
81 test -f sub/another.dvi
82 test -f sub/another.html || test -d sub/another.html
83 test -f sub/another.ps
85 $MAKE mostlyclean
87 ls *.aux && exit 1
88 ls sub/*.aux && exit 1
90 test -f main.dvi
91 test -f main.ps
92 test -f main.html || test -d main.html
93 test -f main.pdf
94 test -f other.pdf
95 test -f sub/another.pdf
97 test -f other.dvi
98 test -f other.html || test -d other.html
99 test -f other.ps
100 test -f sub/another.dvi
101 test -f sub/another.html || test -d sub/another.html
102 test -f sub/another.ps
104 $MAKE clean
106 test ! -e main.dvi
107 test ! -e main.ps
108 test ! -e main.html
109 test ! -e main.pdf
110 test ! -e other.pdf
111 test ! -e sub/another.pdf
112 test ! -e sub/yetanother.pdf
114 test ! -e other.dvi
115 test ! -e other.html
116 test ! -e other.ps
117 test ! -e sub/another.dvi
118 test ! -e sub/another.html
119 test ! -e sub/another.ps
121 ./configure
122 $MAKE
124 $MAKE distcheck