| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 | #! /bin/sh# Copyright (C) 2011-2017 Free Software Foundation, Inc.## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program.  If not, see <http://www.gnu.org/licenses/>.# Test remake rules when the name of an m4 macro change.  Try both with# and without indirection.. test-init.shcat >> configure.ac <<'END'MY_MACROAC_OUTPUTENDcat > Makefile.am <<'END'ACLOCAL_AMFLAGS = -I m4.PHONY: testtest:	test '$(the_answer)' -eq 42ENDmkdir m4cat > m4/macros.m4 <<'END'AC_DEFUN([MY_MACRO], [FOO_1])ENDcat > m4/foo.m4 <<'END'AC_DEFUN([FOO_1], [the_answer=42                   AC_SUBST([the_answer])])END$ACLOCAL -I m4$AUTOCONF$AUTOMAKE./configure$MAKE test$sleepfor x in macros foo; do  sed -e 's/FOO_1/FOO_2/' m4/$x.m4 > t  mv -f t m4/$x.m4doneusing_gmake || $MAKE Makefile$MAKE test$sleepfor f in m4/macros.m4 configure.ac; do  sed -e 's/MY_MACRO/YOUR_MACRO/' $f > t  mv -f t $fdoneusing_gmake || $MAKE Makefile$MAKE test:
 |