tests: give few vala tests more significant names
[automake.git] / t / cygnus-no-dist.sh
blobaf2c45f5907180b7a428dc51b5987c15a0f5b699
1 #! /bin/sh
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)
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 that cygnus mode forbids creation of distribution tarball.
19 . ./defs || exit 1
21 echo AM_MAINTAINER_MODE >> configure.ac
22 mv -f configure.ac configure.stub
24 cat configure.stub - > configure.ac <<'END'
25 AC_OUTPUT
26 END
28 : > Makefile.am
30 $ACLOCAL
31 $AUTOCONF
32 $AUTOMAKE --cygnus -Wno-obsolete
34 ./configure
35 $MAKE
37 for target in dist distdir distcheck dist-all dist-gzip; do
38 $MAKE -n $target >out 2>&1 && { cat out; exit 1; }
39 cat out
40 grep $target out
41 done
43 # Now check that cygnus mode in a subdirectory disables
44 # distribution-building in that subdirectory.
46 cat > Makefile.am <<'END'
47 SUBDIRS = sub1 sub2
48 END
50 mkdir sub1 sub2
51 : > sub1/Makefile.am
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'
56 # target.
57 AUTOMAKE_OPTIONS = cygnus -Wall
58 # This is required because the 'cygnus' option is now deprecated.
59 AUTOMAKE_OPTIONS += -Wno-obsolete
60 END
62 cat configure.stub - > configure.ac <<'END'
63 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
64 AC_OUTPUT
65 END
67 $AUTOCONF
68 $AUTOMAKE
70 ./configure
71 $MAKE
72 cd sub2
73 $MAKE -n distdir >out 2>&1 && { cat out; exit 1; }
74 grep distdir out
75 cd ..
77 cat >> sub2/Makefile.am <<'END'
78 distdir:
79 END
80 $AUTOMAKE sub2/Makefile
81 ./config.status sub2/Makefile
83 $MAKE distdir
84 $MAKE dist