2 # Copyright (C) 2003, 2004, 2005, 2011 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 to make sure that aclocal.m4's dependencies are honored in
18 # sub-directories. See also related tests `remake-subdir*.test'.
22 cat >> configure.
in << 'END'
24 AC_CONFIG_FILES
([sub
/Makefile
])
28 cat > Makefile.am
<< 'END'
30 ACLOCAL_AMFLAGS
= -I m4
37 echo 'AC_DEFUN([AM_TEST], [echo $@])' > m
4/moredefs.
m4
41 $AUTOMAKE --copy --add-missing
45 # Update an aclocal.m4 dependency, then make sure all Makefiles are
46 # updated, even from a sub-directory. Check that AU_ALIAS is
47 # recognized. Change the definition of AM_TEST to check that its new
49 echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m
4/moredefs.
m4
54 grep GREPME sub
/Makefile
56 # Make sure configure dependencies are distributed.
58 test -f $me-1.0
/m
4/moredefs.
m4
60 # Change the definition of AM_TEST to check that its new definition is
61 # used. Check that AC_DEFUN_ONCE is caught.
62 echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m
4/moredefs.
m4
64 grep 'm4/moredefs\.m4' aclocal.
m4
65 grep '__GREPME__' configure