2 # Copyright (C) 2003, 2004, 2006 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)
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 # Make sure automake -Woverride suggests using TARGET-local instead
18 # of TARGET when possible.
24 cat >> configure.
in << 'END'
25 AM_CONDITIONAL
([COND
], [:])
28 cat > Makefile.am
<< 'END'
45 $AUTOMAKE -Wno-override
47 grep ':.*install-local' stderr
&& Exit
1 # There is no such thing as install-local
48 grep ':.*installcheck-local' stderr
49 grep ':.*html-local' stderr
50 # Make sure overriding *-am targets suggest using *-local, not *-am.
51 grep ':.*clean-am-local' stderr
&& Exit
1
52 grep ':.*clean-local' stderr
54 # Conditional overrides ought to be diagnosed, but it can't be done yet.
55 # See the FIXME in Automake::Rule::define. Once this is fixed, the grep below
56 # will fail. If you see the failure, it means you fixed Automake. Well done!
57 # Just strip out the next '&& Exit 1' and this comment.
58 grep ':.*overrides.*ps' stderr
&& Exit
1
60 # Test for another issue. Overriding html: should cause only one
61 # html: rule to be output.
62 test `grep '^html:' Makefile.in | wc -l` = 1
64 # ps: should be output in two conditions
65 test `grep '[^-]ps:' Makefile.in | wc -l` = 2
66 grep '@COND_TRUE@ps: mine' Makefile.
in
67 grep '@COND_FALSE@ps: ps-am' Makefile.
in