tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / txinfo-clean.sh
1 #! /bin/sh
2 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
18 # Similar to txinfo25.sh.
19
20 required='makeinfo tex texi2dvi dvips'
21 . test-init.sh
22
23 mkdir sub
24
25 cat >> configure.ac << 'END'
26 AC_OUTPUT
27 END
28
29 cat > Makefile.am << 'END'
30 info_TEXINFOS = main.texi other.texi sub/another.texi
31 END
32
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
42
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
52
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
62
63 $ACLOCAL
64 $AUTOMAKE --add-missing
65 $AUTOCONF
66
67 # In-tree build.
68 ./configure
69 $MAKE dvi ps pdf html
70
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
77
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
84
85 $MAKE mostlyclean
86
87 ls *.aux && exit 1
88 ls sub/*.aux && exit 1
89
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
96
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
103
104 $MAKE clean
105
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
113
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
120
121 ./configure
122 $MAKE
123
124 $MAKE distcheck
125
126 :