Fix outdated reference to sh-utils in the manual.
[automake.git] / tests / mmode.test
blob19f83f1ff6b5058a3089f5e41a942f6b87a41c9e
1 #! /bin/sh
2 # Copyright (C) 2008 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)
7 # any later version.
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 for AM_MAINTAINER_MODE defaults.
19 . ./defs || Exit 1
21 set -e
23 cat >> configure.in << 'END'
24 AM_MAINTAINER_MODE
25 AC_OUTPUT
26 END
28 : >Makefile.am
30 $ACLOCAL
31 $AUTOCONF
32 $AUTOMAKE -a
34 ./configure --help | grep 'enable-maintainer-mode.*enable make rules'
35 ./configure
36 grep '^MAINT.*#' Makefile
38 ./configure --disable-maintainer-mode
39 grep '^MAINT.*#' Makefile
41 ./configure --enable-maintainer-mode
42 grep '^MAINT.*#' Makefile && Exit 1
44 sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in > configure.int
45 mv -f configure.int configure.in
46 mv configure configure1
47 $AUTOCONF --force
48 diff configure configure1
50 sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > configure.int
51 mv -f configure.int configure.in
52 $AUTOCONF --force
54 ./configure --help | grep 'disable-maintainer-mode.*disable make rules'
55 ./configure
56 grep '^MAINT.*#' Makefile && Exit 1
58 ./configure --enable-maintainer-mode
59 grep '^MAINT.*#' Makefile && Exit 1
61 ./configure --disable-maintainer-mode
62 grep '^MAINT.*#' Makefile
64 sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
65 mv -f configure.int configure.in
66 $AUTOCONF --force -Werror && Exit 1