2 # Copyright (C) 2010-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 cygnus mode forbids creation of distribution tarball.
21 echo AM_MAINTAINER_MODE >> configure.ac
22 mv -f configure.ac configure.stub
24 cat configure.stub - > configure.ac <<'END'
32 $AUTOMAKE --cygnus -Wno-obsolete
37 for target in dist distdir distcheck dist-all dist-gzip; do
38 $MAKE -n $target >out 2>&1 && { cat out; exit 1; }
43 # Now check that cygnus mode in a subdirectory disables
44 # distribution-building in that subdirectory.
46 cat > Makefile.am <<'END'
52 cat > sub2/Makefile.am <<'END'
53 # The '-Wall' after 'cygnus' should ensure no warning gets
54 # unintentionally disabled. We are particularly interested
55 # in override warnings, for when (below) we add the 'distdir'
57 AUTOMAKE_OPTIONS = cygnus -Wall
58 # This is required because the 'cygnus' option is now deprecated.
59 AUTOMAKE_OPTIONS += -Wno-obsolete
62 cat configure.stub - > configure.ac <<'END'
63 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
73 $MAKE -n distdir >out 2>&1 && { cat out; exit 1; }
77 cat >> sub2/Makefile.am <<'END'
80 $AUTOMAKE sub2/Makefile
81 ./config.status sub2/Makefile