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 # Check that AM_MAINTAINER_MODE disable some rebuild rules,
19 # Report from Ralf Corsepius.
26 remake="$MAKE Makefile"
29 cat >>configure.ac <<'EOF'
32 if test ! -f rebuild_ok; then
45 $AUTOMAKE --add-missing
49 # Make sure the rules to rebuild configure/Makefile.in are not
50 # triggered by default. ($MAKE will fail if they are, because the
51 # tools are set to false.)
53 touch aclocal.m4 Makefile.am configure.ac foo.m4
56 # Make sure the rebuild rule for Makefile is triggered.
58 echo '# GrEpMe' >>Makefile.in
62 # Make sure the rebuild rule for config.status is triggered.
64 grep 'AUTOCONF.*=.*false' Makefile
66 ./configure --no-create
68 grep 'AUTOCONF.*=.*false' Makefile && exit 1
70 # Make sure rebuild rules do work if --enable-maintainer-mode is given.
71 ./configure --enable-maintainer-mode
73 echo 'AC_SUBST([YIPPY_YIPPY_YEAH])' >foo.m4
75 grep YIPPY_YIPPY_YEAH Makefile
77 # Try the distribution, for completeness.