2 # Copyright (C) 2003 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Make sure aclocal.m4 is rebuilt whenever a configure
22 # dependency changes. Test for acinclude.m4 and VPATH too.
29 cat >> configure.in << 'END'
31 AC_CONFIG_FILES([sub/Makefile])
35 cat > Makefile.am << 'END'
37 ACLOCAL_AMFLAGS = -I m4
44 echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
45 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
49 $AUTOMAKE --copy --add-missing
51 # Users can disable autom4te.cache.
52 if test -d autom4te.cache; then
64 # Update an aclocal.m4 dependency, then make sure all Makefiles
65 # are updated, even from a sub-directory.
66 echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4
67 # Because aclocal will run again, it should also pick up acinclude.m4.
68 echo 'AC_SUBST([METOO])' > ../acinclude.m4
74 grep GREPME sub/Makefile
75 grep GREPME sub/Makefile
77 grep METOO sub/Makefile
78 grep METOO sub/Makefile
80 # Make sure configure dependencies are distributed.
82 test -f aclocal6-1.0/m4/moredefs.m4
83 test -f aclocal6-1.0/m4/somedefs.m4
84 test -f aclocal6-1.0/acinclude.m4
86 # Make sure maintainer-clean works in VPATH builds.
87 # (This is unrelated to the rest of this test.)
89 $test_cache ../autom4te.cache
92 $MAKE maintainer-clean
93 test ! -d ../autom4te.cache
95 test ! -f sub/Makefile