news: update w.r.t. recent depcomp changes
[automake.git] / t / notrans.sh
blob4b2c8039a217c6a955adc31f0b699f8b1557c867
1 #! /bin/sh
2 # Copyright (C) 2008-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)
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 <http://www.gnu.org/licenses/>.
17 # Check all notrans_, dist_, nodist_ prefix combinations for MANS
18 # primary and install-man dependencies.
20 . test-init.sh
22 cat >>configure.ac <<'END'
23 AC_OUTPUT
24 END
26 cat > Makefile.am << 'EOF'
27 man_MANS = foo.1 foo2.1
28 dist_man_MANS = bar.2 bar2.2
29 nodist_man_MANS = baz.3 baz2.3
30 notrans_man_MANS = x-foo.4 x-foo2.4
31 notrans_dist_man_MANS = x-bar.5 x-bar2.5
32 notrans_nodist_man_MANS = x-baz.6 x-baz2.6
33 man7_MANS = y-foo.man y-foo2.man
34 dist_man5_MANS = y-bar.man y-bar2.man
35 nodist_man4_MANS = y-baz.man y-baz2.man
36 notrans_man3_MANS = z-foo.man z-foo2.man
37 notrans_dist_man2_MANS = z-bar.man z-bar2.man
38 notrans_nodist_man1_MANS = z-baz.man z-baz2.man
40 # These two are ignored.
41 dist_notrans_man_MANS = nosuch.8
42 nodist_notrans_man9_MANS = nosuch.man
44 y-foo.man y-foo2.man:
45 : >$@
46 y-bar.man y-bar2.man:
47 : >$@
48 y-baz.man y-baz2.man:
49 : >$@
50 z-foo.man z-foo2.man:
51 : >$@
52 z-bar.man z-bar2.man:
53 : >$@
54 z-baz.man z-baz2.man:
55 : >$@
57 test-install: install
58 test -f inst/man/man1/gnu-foo.1
59 test -f inst/man/man1/gnu-foo2.1
60 test -f inst/man/man2/gnu-bar.2
61 test -f inst/man/man2/gnu-bar2.2
62 test -f inst/man/man3/gnu-baz.3
63 test -f inst/man/man3/gnu-baz2.3
64 test -f inst/man/man4/x-foo.4
65 test -f inst/man/man4/x-foo2.4
66 test -f inst/man/man5/x-bar.5
67 test -f inst/man/man5/x-bar2.5
68 test -f inst/man/man6/x-baz.6
69 test -f inst/man/man6/x-baz2.6
70 test -f inst/man/man7/gnu-y-foo.7
71 test -f inst/man/man7/gnu-y-foo2.7
72 test -f inst/man/man5/gnu-y-bar.5
73 test -f inst/man/man5/gnu-y-bar2.5
74 test -f inst/man/man4/gnu-y-baz.4
75 test -f inst/man/man4/gnu-y-baz2.4
76 test -f inst/man/man3/z-foo.3
77 test -f inst/man/man3/z-foo2.3
78 test -f inst/man/man2/z-bar.2
79 test -f inst/man/man2/z-bar2.2
80 test -f inst/man/man1/z-baz.1
81 test -f inst/man/man1/z-baz2.1
82 test ! -d inst/man/man8
83 test ! -d inst/man/man9
84 EOF
86 : > foo.1
87 : > foo2.1
88 : > bar.2
89 : > bar2.2
90 : > baz.3
91 : > baz2.3
92 : > x-foo.4
93 : > x-foo2.4
94 : > x-bar.5
95 : > x-bar2.5
96 : > x-baz.6
97 : > x-baz2.6
99 $ACLOCAL
100 $AUTOCONF
101 $AUTOMAKE
103 grep '^install-man1:' Makefile.in | grep '\$(man_MANS)'
104 grep '^install-man2:' Makefile.in | grep '\$(dist_man_MANS)'
105 grep '^install-man3:' Makefile.in | grep '\$(nodist_man_MANS)'
106 grep '^install-man4:' Makefile.in | grep '\$(notrans_man_MANS)'
107 grep '^install-man5:' Makefile.in | grep '\$(notrans_dist_man_MANS)'
108 grep '^install-man6:' Makefile.in | grep '\$(notrans_nodist_man_MANS)'
109 grep '^install-man8:' Makefile.in && exit 1
110 grep '^install-man9:' Makefile.in && exit 1
112 cwd=$(pwd) || fatal_ "getting current working directory"
114 ./configure --program-prefix=gnu- --prefix "$cwd"/inst \
115 --mandir "$cwd"/inst/man
116 $MAKE
117 $MAKE test-install
118 test $(find inst/man -type f -print | wc -l) -eq 24
119 $MAKE uninstall
120 test $(find inst/man -type f -print | wc -l) -eq 0
122 # Opportunistically test for installdirs.
123 rm -rf inst
124 $MAKE installdirs
125 test -d inst/man/man1
126 test -d inst/man/man2
127 test -d inst/man/man3
128 test -d inst/man/man4
129 test -d inst/man/man5
130 test -d inst/man/man6
131 test -d inst/man/man7
132 test -d inst/man/man8 && exit 1
133 test -d inst/man/man9 && exit 1