Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / distdir.test
blob641a307b7a51b326807f361892c70aa10c561bc0
1 #! /bin/sh
2 # Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007 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 to make sure subdirs in EXTRA_DIST work. Also tests to make
18 # sure *srcdir is properly handled. Note that using `./', as in
19 # EXTRA_DIST = ./joe
20 # does not work portably: it fails with HP-UX and Tru64 make.
22 . ./defs || Exit 1
24 set -e
26 echo AC_OUTPUT >>configure.in
28 cat > Makefile.am << 'END'
29 EXTRA_DIST = foo/bar joe $(top_srcdir)/woo/doo $(srcdir)/dada
30 check-local:
31 test -f $(srcdir)/foo/bar
32 test -f $(srcdir)/woo/doo
33 test -f $(srcdir)/joe
34 test -f $(srcdir)/dada
35 END
37 $ACLOCAL
38 $AUTOCONF
39 $AUTOMAKE
41 mkdir foo woo
42 touch foo/bar joe woo/doo dada
44 mkdir build
45 cd build
46 ../configure
47 $MAKE distdir
48 # Check to make sure `foo' isn't made in build directory.
49 test -d foo && Exit 1
51 rm -rf distdir-1.0
52 # Remove the dot from VERSION for the next grep.
53 VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >make.log || :
55 # Make sure no `./' appear in the directory names. srcdir is `..', so
56 # this also checks that no directory is created in the source tree.
57 grep 'MKDIR_P.*\.' make.log && Exit 1
59 cd ..
60 ./configure --prefix "`pwd`"
61 $MAKE distcheck
63 Exit 0