2 # Copyright (C) 2011-2013 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 remake rules when an m4 file gets removed and the macros it
18 # defined get inlined into the caller. Try with both an indirect
19 # call and a direct one. This can be seen as testing the "deleted
20 # header file" issue w.r.t. aclocal.m4 dependencies. See also
21 # related test 'aclocal-deleted-header.sh'.
25 cat >> configure.ac
<<'END'
30 cat > Makefile.am
<<'END'
31 ACLOCAL_AMFLAGS = -I m4
34 test '$(the_answer)' -eq 42
37 macro_value
='the_answer=42; AC_SUBST([the_answer])'
41 cat > m
4/foo.
m4 <<'END'
42 AC_DEFUN([FOO_MACRO], [BAR_MACRO])
46 AC_DEFUN([BAR_MACRO], [$macro_value])
58 sed -e "s|BAR_MACRO|$macro_value|" m
4/foo.
m4 > t
62 using_gmake ||
$MAKE Makefile
67 sed -e "s|FOO_MACRO|$macro_value|" configure.ac
> t
71 using_gmake ||
$MAKE Makefile