Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / subdir4.test
blobc0a5413060de7249da8af01e8d8bcc7dc3e3d6b3
1 #! /bin/sh
2 # Copyright (C) 2000, 2001, 2002 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 # Make sure a top-level depcomp file is found when
18 # AC_CONFIG_AUX_DIR is not specified.
20 . ./defs || Exit 1
22 mkdir lib src
24 cat > configure.in << 'END'
25 AC_INIT
26 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
27 AC_PROG_RANLIB
28 AC_PROG_CC
29 AC_OUTPUT(Makefile lib/Makefile src/Makefile)
30 END
32 # Files required because we are using `--gnu'.
33 : > INSTALL
34 : > NEWS
35 : > README
36 : > COPYING
37 : > AUTHORS
38 : > ChangeLog
40 cat > Makefile.am << 'END'
41 SUBDIRS = lib src
42 END
44 cat > lib/Makefile.am << 'END'
45 pkgdata_DATA =
46 noinst_LIBRARIES = libfoo.a
47 libfoo_a_SOURCES = foo.c
48 END
50 cat > lib/foo.c << 'END'
51 int foo () {}
52 END
54 cat > src/Makefile.am << 'END'
55 pkgdata_DATA =
56 END
58 $ACLOCAL || Exit 1
59 $AUTOMAKE --gnu || Exit 1
61 # Make sure that depcomp is *not* included in the definition
62 # of DIST_COMMON in lib/Makefile.in. If you change this test
63 # so that more files are included in lib's DIST_COMMON definition,
64 # then you must handle the case in which depcomp is listed on a
65 # continued line.
66 grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
68 Exit 0