8f5c706f7063bf0547514719be7193a65817b429
[platform/upstream/automake.git] / tests / suffix10.test
1 #! /bin/sh
2 # Copyright (C) 2002  Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # Make sure that derivations work with .lo too.
18 # (related to PR/37)
19
20 required='libtoolize bison'
21 . ./defs || Exit 1
22
23 set -e
24
25 cat >>configure.in <<EOF
26 AC_PROG_CC
27 AC_PROG_YACC
28 AC_PROG_LIBTOOL
29 AC_OUTPUT
30 EOF
31
32
33 cat >Makefile.am << 'END'
34 lib_LTLIBRARIES = libfoo.la
35 libfoo_la_SOURCES = foo.x_
36
37 .x_.y:
38         cp $< $@
39
40 print:
41         echo BEGIN: $(libfoo_la_OBJECTS) :END
42 END
43
44 libtoolize --force
45 $ACLOCAL
46 $AUTOCONF
47 $AUTOMAKE --add-missing
48 ./configure
49 $MAKE print >stdout
50 cat stdout
51 grep 'BEGIN: foo.lo :END' stdout