2 # Copyright (C) 2011-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)
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 the name of an m4 macro change. Try both with
18 # and without indirection.
22 cat >> configure.ac <<'END'
27 cat > Makefile.am <<'END'
28 ACLOCAL_AMFLAGS = -I m4
31 test '$(the_answer)' -eq 42
36 cat > m4/macros.m4 <<'END'
37 AC_DEFUN([MY_MACRO], [FOO_1])
40 cat > m4/foo.m4 <<'END'
41 AC_DEFUN([FOO_1], [the_answer=42
42 AC_SUBST([the_answer])])
54 for x in macros foo; do
55 sed -e 's/FOO_1/FOO_2/' m4/$x.m4 > t
59 using_gmake || $MAKE Makefile
64 for f in m4/macros.m4 configure.ac; do
65 sed -e 's/MY_MACRO/YOUR_MACRO/' $f > t
69 using_gmake || $MAKE Makefile