2 # Copyright (C) 1996-2012 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 2, or (at your option)
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
20 # does not work portably: it fails with HP-UX and Tru64 make.
21 # Also test DISTFILES containing a directory and a file in it,
22 # and repeated directories.
26 cat >> configure.ac
<< 'END'
30 cat > Makefile.am
<< 'END'
31 include_HEADERS
= some
/file another
/sub
/subsub
/file2 yet
/another
/file3
32 EXTRA_DIST
= foo
/bar joe $
(top_srcdir
)/woo
/doo $
(srcdir
)/dada \
33 some another
/sub yet \
38 $
(MKDIR_P
) another
/sub
/subsub
39 touch another
/sub
/subsub
/file2
41 CLEANFILES
= another
/sub
/subsub
/file2
44 test -f $
(srcdir
)/foo
/bar
45 test -f $
(srcdir
)/woo
/doo
47 test -f $
(srcdir
)/dada
48 test -f $
(srcdir
)/some
/file
49 test -f $
(srcdir
)/another
/sub
/subsub
/file2 \
50 ||
test -f /another
/sub
/subsub
/file2
51 test -f $
(srcdir
)/yet
/another
/file3
58 mkdir foo woo some another another
/sub another
/sub
/subsub yet yet
/another
59 touch foo
/bar joe woo
/doo dada some
/file another
/sub
/subsub
/file2
60 touch yet
/another
/file3
66 # Check to make sure 'foo' isn't made in build directory.
70 # Remove the dot from VERSION for the next grep.
71 VERSION
=10 MKDIR_P
='echo MKDIR_P' $MAKE -e distdir
>stdout ||
:
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.*\.' stdout
&& exit 1
79 .
/configure
--prefix "$(pwd)"