2 # Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009 Free Software
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 echo AC_OUTPUT >>configure.in
31 cat > Makefile.am << 'END'
32 include_HEADERS = some/file another/sub/subsub/file2 yet/another/file3
33 EXTRA_DIST = foo/bar joe $(top_srcdir)/woo/doo $(srcdir)/dada \
34 some another/sub yet \
39 $(MKDIR_P) another/sub/subsub
40 touch another/sub/subsub/file2
42 CLEANFILES = another/sub/subsub/file2
45 test -f $(srcdir)/foo/bar
46 test -f $(srcdir)/woo/doo
48 test -f $(srcdir)/dada
49 test -f $(srcdir)/some/file
50 test -f $(srcdir)/another/sub/subsub/file2 \
51 || test -f /another/sub/subsub/file2
52 test -f $(srcdir)/yet/another/file3
59 mkdir foo woo some another another/sub another/sub/subsub yet yet/another
60 touch foo/bar joe woo/doo dada some/file another/sub/subsub/file2
61 touch yet/another/file3
67 # Check to make sure `foo' isn't made in build directory.
71 # Remove the dot from VERSION for the next grep.
72 VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >make.log || :
74 # Make sure no `./' appear in the directory names. srcdir is `..', so
75 # this also checks that no directory is created in the source tree.
76 grep 'MKDIR_P.*\.' make.log && Exit 1
79 ./configure --prefix "`pwd`"