Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / mmode.test
1 #! /bin/sh
2 # Copyright (C) 2008, 2010 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # Check for AM_MAINTAINER_MODE defaults.
18
19 . ./defs || Exit 1
20
21 set -e
22
23 cat >> configure.in << 'END'
24 AM_MAINTAINER_MODE
25 AC_OUTPUT
26 END
27
28 : >Makefile.am
29
30 $ACLOCAL
31 $AUTOCONF
32 $AUTOMAKE -a
33
34 ./configure
35 grep '^MAINT.*#' Makefile
36
37 ./configure --disable-maintainer-mode
38 grep '^MAINT.*#' Makefile
39
40 ./configure --enable-maintainer-mode
41 grep '^MAINT.*#' Makefile && Exit 1
42
43 sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in > configure.int
44 mv -f configure.int configure.in
45 mv configure configure1
46 $AUTOCONF --force
47 diff configure configure1
48
49 sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > configure.int
50 mv -f configure.int configure.in
51 $AUTOCONF --force
52
53 ./configure
54 grep '^MAINT.*#' Makefile && Exit 1
55
56 ./configure --enable-maintainer-mode
57 grep '^MAINT.*#' Makefile && Exit 1
58
59 ./configure --disable-maintainer-mode
60 grep '^MAINT.*#' Makefile
61
62 sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
63 mv -f configure.int configure.in
64 $AUTOCONF --force -Werror && Exit 1
65
66 :