2 # Copyright (C) 2002, 2003, 2010, 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)
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 # Test to make sure Automake supports multiple derivations for the same suffix.
20 required='gcc libtoolize'
25 cat >>configure.in <<'END'
30 cat >Makefile.am << 'END'
32 lib_LTLIBRARIES = libfoo.la
35 libfoo_la_SOURCES = bar.x_
52 # Add explicit dependencies to help make implementations that
53 # don't otherwise chain implicit rules (e.g., Sun make).
59 @echo BEGIN: $(foo_OBJECTS) :END
60 @echo BEGIN: $(libfoo_la_OBJECTS) :END
62 test: $(foo_OBJECTS) $(libfoo_la_OBJECTS)
67 echo 'int main() { return 0; }' > foo.x_
77 OBJEXT=foo $MAKE -e print >stdout || { cat stdout; Exit 1; }
79 $FGREP 'BEGIN: foo.foo :END' stdout
80 $FGREP 'BEGIN: bar.lo :END' stdout