2 # Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009, 2010 Free
3 # Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Test to make sure subdirs in EXTRA_DIST work. Also tests to make
19 # sure *srcdir is properly handled. Note that using `./', as in
21 # does not work portably: it fails with HP-UX and Tru64 make.
22 # Also test DISTFILES containing a directory and a file in it,
23 # and repeated directories.
29 cat >> configure.in << 'END'
33 cat > Makefile.am << 'END'
34 include_HEADERS = some/file another/sub/subsub/file2 yet/another/file3
35 EXTRA_DIST = foo/bar joe $(top_srcdir)/woo/doo $(srcdir)/dada \
36 some another/sub yet \
41 $(MKDIR_P) another/sub/subsub
42 touch another/sub/subsub/file2
44 CLEANFILES = another/sub/subsub/file2
47 test -f $(srcdir)/foo/bar
48 test -f $(srcdir)/woo/doo
50 test -f $(srcdir)/dada
51 test -f $(srcdir)/some/file
52 test -f $(srcdir)/another/sub/subsub/file2 \
53 || test -f /another/sub/subsub/file2
54 test -f $(srcdir)/yet/another/file3
61 mkdir foo woo some another another/sub another/sub/subsub yet yet/another
62 touch foo/bar joe woo/doo dada some/file another/sub/subsub/file2
63 touch yet/another/file3
69 # Check to make sure `foo' isn't made in build directory.
73 # Remove the dot from VERSION for the next grep.
74 VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >stdout || :
77 # Make sure no `./' appear in the directory names. srcdir is `..', so
78 # this also checks that no directory is created in the source tree.
79 grep 'MKDIR_P.*\.' stdout && Exit 1
82 ./configure --prefix "`pwd`"