Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / extra7.test
bloba481506bdffd578ed7490d542b1f65ebe9fd75ac
1 #! /bin/sh
2 # Copyright (C) 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 # Check to make sure that when distdir is invoked in a VPATH
18 # configuration and has to distribute directory X, it actually merge
19 # $(srcdir)/X and ./X, with the files from the later overriding the
20 # files from the former.
22 . ./defs || Exit 1
24 set -e
26 echo AC_OUTPUT >> configure.in
28 cat > Makefile.am << 'END'
29 EXTRA_DIST=foo/bar baz
31 check: distdir
32 test -f $(distdir)/foo/bar/baz
33 test -f $(distdir)/foo/bar/baz2
34 test -f $(distdir)/baz/foo
35 test -f $(distdir)/baz/foo2
36 grep source $(distdir)/foo/bar/baz
37 grep build $(distdir)/foo/bar/baz2
38 grep source $(distdir)/baz/foo
39 grep build $(distdir)/baz/foo2
40 END
42 # Create some files in $(srcdir)
43 mkdir foo
44 mkdir foo/bar
45 echo source > foo/bar/baz
46 echo source > foo/bar/baz2
47 mkdir baz
48 echo source > baz/foo
49 echo source > baz/foo2
51 $ACLOCAL
52 $AUTOMAKE
53 $AUTOCONF
54 mkdir build
55 cd build
56 ../configure
58 # Create some files in $(builddir) that will override part of the
59 # files if $(srcdir) when the distribution is made.
60 mkdir foo
61 mkdir foo/bar
62 echo build > foo/bar/baz2
63 mkdir baz
64 echo build > baz/foo2
66 $MAKE check