Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / notrans.test
blobe00566c89378370ab4de7ba9967bb36b59f47205
1 #! /bin/sh
2 # Copyright (C) 2008 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 3, 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 . ./defs || Exit 1
22 set -e
24 cat >>configure.in <<'END'
25 AC_OUTPUT
26 END
28 cat > Makefile.am << 'EOF'
29 man_MANS = foo.1 foo2.1
30 dist_man_MANS = bar.2 bar2.2
31 nodist_man_MANS = baz.3 baz2.3
32 notrans_man_MANS = x-foo.4 x-foo2.4
33 notrans_dist_man_MANS = x-bar.5 x-bar2.5
34 notrans_nodist_man_MANS = x-baz.6 x-baz2.6
35 man7_MANS = y-foo.man y-foo2.man
36 dist_man5_MANS = y-bar.man y-bar2.man
37 nodist_man4_MANS = y-baz.man y-baz2.man
38 notrans_man3_MANS = z-foo.man z-foo2.man
39 notrans_dist_man2_MANS = z-bar.man z-bar2.man
40 notrans_nodist_man1_MANS = z-baz.man z-baz2.man
42 # These two are ignored
43 dist_notrans_man_MANS = nosuch.8
44 nodist_notrans_man9_MANS = nosuch.man
46 y-foo.man y-foo2.man:
47 : >$@
48 y-bar.man y-bar2.man:
49 : >$@
50 y-baz.man y-baz2.man:
51 : >$@
52 z-foo.man z-foo2.man:
53 : >$@
54 z-bar.man z-bar2.man:
55 : >$@
56 z-baz.man z-baz2.man:
57 : >$@
59 test-install: install
60 test -f inst/man/man1/gnu-foo.1
61 test -f inst/man/man1/gnu-foo2.1
62 test -f inst/man/man2/gnu-bar.2
63 test -f inst/man/man2/gnu-bar2.2
64 test -f inst/man/man3/gnu-baz.3
65 test -f inst/man/man3/gnu-baz2.3
66 test -f inst/man/man4/x-foo.4
67 test -f inst/man/man4/x-foo2.4
68 test -f inst/man/man5/x-bar.5
69 test -f inst/man/man5/x-bar2.5
70 test -f inst/man/man6/x-baz.6
71 test -f inst/man/man6/x-baz2.6
72 test -f inst/man/man7/gnu-y-foo.7
73 test -f inst/man/man7/gnu-y-foo2.7
74 test -f inst/man/man5/gnu-y-bar.5
75 test -f inst/man/man5/gnu-y-bar2.5
76 test -f inst/man/man4/gnu-y-baz.4
77 test -f inst/man/man4/gnu-y-baz2.4
78 test -f inst/man/man3/z-foo.3
79 test -f inst/man/man3/z-foo2.3
80 test -f inst/man/man2/z-bar.2
81 test -f inst/man/man2/z-bar2.2
82 test -f inst/man/man1/z-baz.1
83 test -f inst/man/man1/z-baz2.1
84 if test -d inst/man/man8; then (exit 1); else :; fi
85 if test -d inst/man/man9; then (exit 1); else :; fi
86 EOF
88 : > foo.1
89 : > foo2.1
90 : > bar.2
91 : > bar2.2
92 : > baz.3
93 : > baz2.3
94 : > x-foo.4
95 : > x-foo2.4
96 : > x-bar.5
97 : > x-bar2.5
98 : > x-baz.6
99 : > x-baz2.6
101 $ACLOCAL
102 $AUTOCONF
103 $AUTOMAKE
105 grep '^install-man1:' Makefile.in | grep '\$(man_MANS)'
106 grep '^install-man2:' Makefile.in | grep '\$(dist_man_MANS)'
107 grep '^install-man3:' Makefile.in | grep '\$(nodist_man_MANS)'
108 grep '^install-man4:' Makefile.in | grep '\$(notrans_man_MANS)'
109 grep '^install-man5:' Makefile.in | grep '\$(notrans_dist_man_MANS)'
110 grep '^install-man6:' Makefile.in | grep '\$(notrans_nodist_man_MANS)'
112 if grep '^install-man8:' Makefile.in; then Exit 1; else :; fi
113 if grep '^install-man9:' Makefile.in; then Exit 1; else :; fi
115 ./configure --program-prefix=gnu- --prefix "`pwd`"/inst --mandir "`pwd`"/inst/man
116 $MAKE
117 $MAKE test-install
118 test `find inst/man -type f -print | wc -l` = 24
119 $MAKE uninstall
120 test `find inst/man -type f -print | wc -l` = 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 if test -d inst/man/man8; then Exit 1; else :; fi
133 if test -d inst/man/man9; then Exit 1; else :; fi