test init: refactor: new function 'am_setup_testdir'
[automake.git] / t / extra10.sh
blobde82422587f13d205e23eb6fe65b3b7dab94a5d3
1 #! /bin/sh
2 # Copyright (C) 2010-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)
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 <http://www.gnu.org/licenses/>.
17 # Check that wildcards in EXTRA_DIST are honoured.
18 # Suggested by observations from Braden McDaniel.
19 # See also sister test 'extra11.test', that check a similar usage
20 # with the involvement of the $(wildcard) GNU make builtin.
22 required=GNUmake
23 . ./defs || exit 1
25 echo AC_OUTPUT >> configure.ac
27 cat > Makefile.am <<'END'
28 EXTRA_DIST = *.foo
29 .PHONY: test
30 test: distdir
31 diff a.foo $(distdir)/a.foo
32 diff b.foo $(distdir)/b.foo
33 test ! -r $(distdir)/c.bar
34 check-local:
35 test -f $(srcdir)/a.foo
36 test -f $(srcdir)/b.foo
37 test ! -r $(srcdir)/c.bar
38 END
40 $ACLOCAL
41 $AUTOMAKE
42 $AUTOCONF
44 echo aaa > a.foo
45 echo bbb > b.foo
46 echo ccc > c.bar
47 ./configure
48 $MAKE test