maint: Post-release administrivia
[automake.git] / t / recurs-user-wrap.sh
blob1435559b7a1bf1b16cd11be3fc9f065f43cbbd19
1 #! /bin/sh
2 # Copyright (C) 2012-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)
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 that rules generated by user recursion are apt to be wrapped
18 # by other makefiles.
20 required=GNUmake
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AM_EXTRA_RECURSIVE_TARGETS([extra])
25 AC_CONFIG_FILES([src/Makefile])
26 AC_OUTPUT
27 END
29 mkdir src
30 echo SUBDIRS = src > Makefile.am
31 echo 'bar: ; : > $@ ' > src/Makefile.am
33 $ACLOCAL
34 $AUTOCONF
35 $AUTOMAKE
37 ./configure
39 $MAKE extra
40 test ! -f extra-local
41 test ! -f src/bar
43 cat > GNUmakefile << 'END'
44 .DEFAULT_GOAL = all
45 extra-local:
46 : > $@
47 include ./Makefile
48 END
50 cat > src/GNUmakefile << 'END'
51 include ./Makefile
52 extra-local: bar
53 END
55 $MAKE extra
56 test -f extra-local
57 test -f src/bar