Merge branch 'minor'
[automake.git] / t / extra-dist-dirs-and-subdirs.sh
blobeb958a0d59c3179d1faa8497be5814c8fc120e71
1 #! /bin/sh
2 # Copyright (C) 2002-2017 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)
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 <https://www.gnu.org/licenses/>.
17 # Check to make sure EXTRA_DIST can contain a directory or
18 # a subdirectory, in $(builddir) or $(srcdir).
20 . test-init.sh
22 echo AC_OUTPUT >> configure.ac
24 cat > Makefile.am << 'END'
25 EXTRA_DIST=foo/bar baz foo2/bar2 baz2
27 check: distdir
28 test -f $(distdir)/foo/bar/baz
29 test -f $(distdir)/baz/foo
30 test -f $(distdir)/foo2/bar2/baz2
31 test -f $(distdir)/baz2/foo2
32 END
34 # Create some files in $(srcdir)
35 mkdir foo
36 mkdir foo/bar
37 touch foo/bar/baz
38 mkdir baz
39 touch baz/foo
41 $ACLOCAL
42 $AUTOMAKE
43 $AUTOCONF
44 mkdir build
45 cd build
46 ../configure
48 # Create some files in $(builddir)
49 mkdir foo2
50 mkdir foo2/bar2
51 touch foo2/bar2/baz2
52 mkdir baz2
53 touch baz2/foo2
55 $MAKE check