2 # Copyright (C) 2002, 2003, 2010 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 # Tests that Automake understands multiple suffix rules on the same line.
18 # PR/371 and PR/372: Reported by Duncan Gibson.
19 # We also check for suffixes containing `-'.
25 cat >>configure.
in <<EOF
30 cat >Makefile.am
<< 'END'
31 bin_PROGRAMS
= foo bar baz
34 baz_SOURCES
= baz1.x_ baz2.y-z
42 @
echo BEGIN
: $
(foo_OBJECTS
) :END
43 @
echo BEGIN
: $
(bar_OBJECTS
) :END
44 @
echo BEGIN
: $
(baz_OBJECTS
) :END
50 # What we do is not portable. Automake should warn.
52 grep '[iI]nference rules can have only one target before the colon' stderr
54 # But this should work anyway.
55 $AUTOMAKE -a -Wno-portability
59 OBJEXT
=foo
$MAKE -e print
>stdout ||
{ cat stdout
; Exit
1; }
61 $FGREP 'BEGIN: foo.foo :END' stdout
62 $FGREP 'BEGIN: bar.foo :END' stdout
63 $FGREP 'BEGIN: baz1.foo baz2.foo :END' stdout