See also discussion about automake wishlist bug#13324.
* lib/Automake/Options.pm: Give fatal errors (rather than warnings) if
the 'dist-shar' or 'dist-tarZ' options are used.
* lib/distdir.am: Remove the 'dist-tarZ' and 'dist-shar' targets, and
references to the '.tar.Z' and '.shar' archives.
* bin/automake.in (preprocess_file): Remove 'COMPRESS' and 'SHAR'
transforms.
(handle_dist): Remove lingering references to 'dist-tarZ' and 'dist-shar'
options.
* doc/automake.texi: Adjust, removing references to the removed targets
and distribution formats.
* t/dist-shar.sh: Adjust to expect fatal errors rather than warnings.
* t/dist-tarZ.sh: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
{
my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
$archive_defined ||=
- grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip xz);
+ grep { option "dist-$_" } qw(zip bzip2 lzip xz);
error (option 'no-dist-gzip',
"no-dist-gzip specified but no dist-* specified,\n"
. "at least one archive format must be enabled")
'XZ' => !! option 'dist-xz',
'LZIP' => !! option 'dist-lzip',
'BZIP2' => !! option 'dist-bzip2',
- 'COMPRESS' => !! option 'dist-tarZ',
'GZIP' => ! option 'no-dist-gzip',
- 'SHAR' => !! option 'dist-shar',
'ZIP' => !! option 'dist-zip',
'INSTALL-INFO' => ! option 'no-installinfo',
Generate a @samp{zip} archive of the distribution.
@trindex dist-zip
-@item @code{dist-tarZ}
-Generate a tar archive of the distribution, compressed with the
-historical (and obsolescent) program @command{compress}. This
-option is deprecated, and it and the corresponding functionality
-will be removed altogether in Automake 2.0.
-@trindex dist-tarZ
-
-@item @code{dist-shar}
-Generate a @samp{shar} archive of the distribution. This format
-archive is obsolescent, and use of this option is deprecated.
-It and the corresponding functionality will be removed altogether
-in Automake 2.0.
-@trindex dist-shar
-
@end table
The rule @code{dist} (and its historical synonym @code{dist-all})
Hook @code{dist-zip} to @code{dist}.
@trindex dist-zip
-@item @option{dist-shar}
-@cindex Option, @option{dist-shar}
-@opindex dist-shar
-Hook @code{dist-shar} to @code{dist}. Use of this option
-is deprecated, as the @samp{shar} format is obsolescent and
-problematic. Support for it will be removed altogether in
-Automake 2.0.
-@trindex dist-shar
-
-@item @option{dist-tarZ}
-@cindex Option, @option{dist-tarZ}
-@opindex dist-tarZ
-Hook @code{dist-tarZ} to @code{dist}. Use of this option
-is deprecated, as the @samp{compress} program is obsolete.
-Support for it will be removed altogether in Automake 2.0.
-@trindex dist-tarZ
-
@item @option{filename-length-max=99}
@cindex Option, @option{filename-length-max=99}
@opindex filename-length-max=99
These three mutually exclusive options select the tar format to use
when generating tarballs with @samp{make dist}. (The tar file created
is then compressed according to the set of @option{no-dist-gzip},
-@option{dist-bzip2}, @option{dist-lzip}, @option{dist-xz} and
-@option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzip} and @option{dist-xz} in use).
These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
(@pxref{Macros}) because they can require additional configure checks.
@c LocalWords: installinfo vers MAKEINFO makeinfo MAKEINFOFLAGS noinstall rf
@c LocalWords: mandir thesame alsothesame installman myexecbin DESTDIR Pinard
@c LocalWords: uninstall installdirs uninstalls MOSTLYCLEANFILES mostlyclean
-@c LocalWords: DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip shar exp
+@c LocalWords: DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip exp
@c LocalWords: distdir distcheck distcleancheck listfiles distuninstallcheck
@c LocalWords: VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
@c LocalWords: RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis readme DVIPS
-@c LocalWords: installcheck gzipped tarZ std utils etags mkid cd
+@c LocalWords: installcheck gzipped std utils etags mkid cd
@c LocalWords: ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
@c LocalWords: foocc doit idlC multilibs ABIs cmindex defmac ARG enableval FC
@c LocalWords: MSG xtrue DBG pathchk CYGWIN afile proglink versioned CVS's TE
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
}
- # TODO: Make this a fatal error in Automake 2.0.
+ # TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-shar')
{
- msg ('obsolete', $where,
- "support for shar distribution archives is deprecated.\n" .
- " It will be removed in Automake 2.0");
+ error ($where, "support for shar distribution archives has " .
+ "been removed.");
}
- # TODO: Make this a fatal error in Automake 2.0.
+ # TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-tarZ')
{
- msg ('obsolete', $where,
- "support for distribution archives compressed with " .
- "legacy program 'compress' is deprecated.\n" .
- " It will be removed in Automake 2.0");
+ error ($where, "support for distribution archives compressed " .
+ "with legacy program 'compress' has " .
+ "been removed.");
}
elsif (/^filename-length-max=(\d+)$/)
{
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
-?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
-.PHONY: dist-tarZ
-dist-tarZ: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__post_remove_distdir)
-
-?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
-.PHONY: dist-shar
-dist-shar: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__post_remove_distdir)
-
?ZIP?DIST_ARCHIVES += $(distdir).zip
.PHONY: dist-zip
dist-zip: distdir
?LZIP?DIST_TARGETS += dist-lzip
?XZ?DIST_TARGETS += dist-xz
-?SHAR?DIST_TARGETS += dist-shar
?BZIP2?DIST_TARGETS += dist-bzip2
?GZIP?DIST_TARGETS += dist-gzip
?ZIP?DIST_TARGETS += dist-zip
-?COMPRESS?DIST_TARGETS += dist-tarZ
endif %?TOPDIR_P%
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-shar.
+# Trying to use removed option 'dist-shar' should trigger a clear
+# error message.
required=shar
. test-init.sh
-errmsg='support for shar .*deprecated'
+errmsg='support for shar .*removed'
echo AUTOMAKE_OPTIONS = dist-shar > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f $distdir.shar.gz
-
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-tarZ.
+# Trying to use removed option 'dist-tarZ' should trigger a clear
+# error message.
. test-init.sh
-# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
-# and is just a dummy script that is not able to actually compress
-# (it can only decompress). So, check that the 'compress' program
-# is actually able to compress input.
-# Note that, at least on GNU/Linux, 'compress' does (and is
-# documented to) exit with status 2 if the output is larger than
-# the input after (attempted) compression; so we need to pass it
-# an input that it can actually reduce in size when compressing.
-for x in 1 2 3 4 5 6 7 8; do
- echo aaaaaaaaaaaaaaaaaaaaa
-done | compress -c >/dev/null \
- || skip_ "cannot find a working 'compress' program"
-
-errmsg=".*legacy .*'compress' .*deprecated"
+errmsg=".*legacy .*'compress'.* removed"
echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f dist-tarz-1.0.tar.Z
-
: