Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / ltinstloc.test
blobd6122fdeabd32cb3f5653fc664f6880fe9b2fd71
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 # Test for libtool errors for multiple install locations, esp. with nobase.
20 required='libtoolize'
21 . ./defs || Exit 1
23 set -e
25 cat >>configure.in <<'END'
26 AC_PROG_CC
27 AC_PROG_LIBTOOL
28 AM_CONDITIONAL([COND], [:])
29 AC_OUTPUT
30 END
32 cat >Makefile.am <<'END'
33 if COND
34 lib_LTLIBRARIES = liba1.la sub/liba2.la
35 #else
36 pkglib_LTLIBRARIES = liba1.la
37 nobase_lib_LTLIBRARIES = sub/liba2.la
38 endif
39 END
41 libtoolize
42 $ACLOCAL
43 $AUTOCONF
44 AUTOMAKE_fails --add-missing
46 cat >expected <<'END'
47 configure.in:5: installing `./config.guess'
48 configure.in:5: installing `./config.sub'
49 Makefile.am:5: sub/liba2.la multiply defined in condition COND
50 Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition COND ...
51 Makefile.am:2: ... and should also be installed in `lib' in condition COND.
52 Makefile.am:4: liba1.la multiply defined in condition COND
53 Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
54 Makefile.am:2: ... and should also be installed in `lib' in condition COND.
55 Makefile.am:2: Libtool libraries can be built for only one destination.
56 END
58 diff stderr expected
60 sed 's/#//' < Makefile.am > t
61 mv -f t Makefile.am
63 $AUTOMAKE
64 grep ' -rpath \$(libdir)/sub' Makefile.in