2 # Copyright (C) 2002-2018 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 <https://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.
24 echo AC_OUTPUT
>> configure.ac
26 cat > Makefile.am
<< 'END'
27 EXTRA_DIST
=foo
/bar baz
30 test -f $
(distdir
)/foo
/bar
/baz
31 test -f $
(distdir
)/foo
/bar
/baz2
32 test -f $
(distdir
)/baz
/foo
33 test -f $
(distdir
)/baz
/foo2
34 grep source $
(distdir
)/foo
/bar
/baz
35 grep build $
(distdir
)/foo
/bar
/baz2
36 grep source $
(distdir
)/baz
/foo
37 grep build $
(distdir
)/baz
/foo2
40 # Create some files in $(srcdir)
43 echo source > foo
/bar
/baz
44 echo source > foo
/bar
/baz2
47 echo source > baz
/foo2
56 # Create some files in $(builddir) that will override part of the
57 # files if $(srcdir) when the distribution is made.
60 echo build
> foo
/bar
/baz2