doc: update Vala documentation
[automake.git] / t / dist-tarZ.sh
blob2b96b52b0b002deebbc09cd1fca3bd2adbd0fce7
1 #! /bin/sh
2 # Copyright (C) 2013-2024 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 <https://www.gnu.org/licenses/>.
17 # Check support for no-dist-gzip with dist-tarZ.
19 . test-init.sh
21 # On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
22 # and is just a dummy script that is not able to actually compress
23 # (it can only decompress). So, check that the 'compress' program
24 # is actually able to compress input.
25 # Note that, at least on GNU/Linux, 'compress' does (and is
26 # documented to) exit with status 2 if the output is larger than
27 # the input after (attempted) compression; so we need to pass it
28 # an input that it can actually reduce in size when compressing.
29 for x in 1 2 3 4 5 6 7 8; do
30 echo aaaaaaaaaaaaaaaaaaaaa
31 done | compress -c >/dev/null \
32 || skip_ "cannot find a working 'compress' program"
34 errmsg=".*legacy .*'compress' .*deprecated"
36 echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
37 $ACLOCAL
38 AUTOMAKE_fails -Wnone -Wobsolete
39 grep "^Makefile\\.am:1:.*$errmsg" stderr
41 cat > configure.ac <<END
42 AC_INIT([$me], [1.0])
43 AM_INIT_AUTOMAKE([no-dist-gzip dist-tarZ])
44 AC_CONFIG_FILES([Makefile])
45 AC_OUTPUT
46 END
47 : > Makefile.am
49 rm -rf autom4te*.cache
50 $ACLOCAL
51 AUTOMAKE_run -Wno-error
52 grep "^configure\\.ac:2:.*$errmsg" stderr
54 $AUTOCONF
55 ./configure
56 $MAKE distcheck
57 test -f dist-tarz-1.0.tar.Z