2 # Copyright (C) 2003-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 # Make sure aclocal.m4 is rebuilt whenever a configure
18 # dependency changes. Test for acinclude.m4 and VPATH too.
22 cat >> configure.ac
<< 'END'
24 AC_CONFIG_FILES
([sub
/Makefile
])
28 cat > Makefile.am
<< 'END'
30 ACLOCAL_AMFLAGS
= -I m4
37 echo 'AC_DEFUN([SOME_DEFS], [])' > m
4/somedefs.
m4
38 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m
4/moredefs.
m4
42 $AUTOMAKE --copy --add-missing
50 # Modified configure dependencies must be newer than config.status.
52 # Update an aclocal.m4 dependency, then make sure all Makefiles
53 # are updated, even from a sub-directory.
54 echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ..
/m
4/somedefs.
m4
55 # Because aclocal will run again, it should also pick up acinclude.m4.
56 echo 'AC_SUBST([METOO])' > ..
/acinclude.
m4
62 grep GREPME sub
/Makefile
63 grep GREPME sub
/Makefile
65 grep METOO sub
/Makefile
66 grep METOO sub
/Makefile
68 # Make sure configure dependencies are distributed.
70 test -f $me-1.0
/m
4/moredefs.
m4
71 test -f $me-1.0
/m
4/somedefs.
m4
72 test -f $me-1.0
/acinclude.
m4