2 # Copyright (C) 2003 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 # Make sure aclocal.m4 is rebuilt whenever a configure
18 # dependency changes. Test for acinclude.m4 and VPATH too.
25 cat >> configure.in << 'END'
27 AC_CONFIG_FILES([sub/Makefile])
31 cat > Makefile.am << 'END'
33 ACLOCAL_AMFLAGS = -I m4
40 echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
41 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
45 $AUTOMAKE --copy --add-missing
47 # Users can disable autom4te.cache.
48 if test -d autom4te.cache; then
60 # Update an aclocal.m4 dependency, then make sure all Makefiles
61 # are updated, even from a sub-directory.
62 echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4
63 # Because aclocal will run again, it should also pick up acinclude.m4.
64 echo 'AC_SUBST([METOO])' > ../acinclude.m4
70 grep GREPME sub/Makefile
71 grep GREPME sub/Makefile
73 grep METOO sub/Makefile
74 grep METOO sub/Makefile
76 # Make sure configure dependencies are distributed.
78 test -f aclocal6-1.0/m4/moredefs.m4
79 test -f aclocal6-1.0/m4/somedefs.m4
80 test -f aclocal6-1.0/acinclude.m4
82 # Make sure maintainer-clean works in VPATH builds.
83 # (This is unrelated to the rest of this test.)
85 $test_cache ../autom4te.cache
88 $MAKE maintainer-clean
89 test ! -d ../autom4te.cache
91 test ! -f sub/Makefile