From: Stefano Lattarini Date: Sat, 11 Aug 2012 08:59:32 +0000 (+0200) Subject: [ng] dist: remove obsolete distribution formats X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60b6c2e4e5f95aabf7a652f68123305968d3e3c3;p=thirdparty%2Fautomake.git [ng] dist: remove obsolete distribution formats Those formats being the 'shar' archive and the tar archive compressed with 'compress'. Support for them is kept in mainline Automake for the sake of backward compatibility only, and modern software releases should not use those formats anyway, so it's better if we just remove them. * NG-NEWS, doc/automake-ng.texi: Update. * lib/Automake/Options.pm (_is_valid_easy_option): Remove 'dist-shar' and 'dist-tarZ'. (_process_option_list): Give a fatal error if one of those two options is seen. * lib/am/distdir.am (am.dist.ext.tarZ, am.dist.ext.shar): Remove these variables. (dist-tarZ, dist-shar): And these targets. * lib/am/distcheck.mk (distcheck): Do not try to decompress '.shar.gz' or '.tar.Z' archives: they won't be there anyway. * t/dist-formats.tap: Adjust and simplify. * t/dist-obsolete.sh: New test. * t/lzma.sh: Remove, subsumed by it. Signed-off-by: Stefano Lattarini --- diff --git a/NG-NEWS b/NG-NEWS index 1d15d39d3..e953f5206 100644 --- a/NG-NEWS +++ b/NG-NEWS @@ -223,6 +223,11 @@ Distribution Do not use any of these variables in your Makefiles! +* Support for distribution archived in the '.shar.gz' and '.tar.Z' formats + have been removed. Accordingly, the targets 'dist-shar' and 'dist-tarZ' + are no more present in the generated Makefiles, and the use of the + Automake options 'dist-shar' and 'dist-tarZ' will elicit a fatal error. + Obsolete Features Removed ========================= diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi index 8bee89e13..1470f63ff 100644 --- a/doc/automake-ng.texi +++ b/doc/automake-ng.texi @@ -8569,10 +8569,6 @@ Generate an @samp{lzip} tar archive of the distribution. @command{lzip} archives are frequently smaller than @command{bzip2}-compressed archives. @trindex dist-lzip -@item @code{dist-shar} -Generate a shar archive of the distribution. -@trindex dist-shar - @vindex XZ_OPT @item @code{dist-xz} Generate an @samp{xz} tar archive of the distribution. @command{xz} @@ -8588,10 +8584,6 @@ default compression ratio, but with a progress indicator: Generate a zip archive of the distribution. @trindex dist-zip -@item @code{dist-tarZ} -Generate a compressed tar archive of -the distribution. -@trindex dist-tarZ @end table The rule @code{dist} (and its historical synonym @code{dist-all}) will @@ -9929,24 +9921,12 @@ Hook @code{dist-bzip2} to @code{dist}. Hook @code{dist-lzip} to @code{dist}. @trindex dist-lzip -@item @option{dist-shar} -@cindex Option, @option{dist-shar} -@opindex dist-shar -Hook @code{dist-shar} to @code{dist}. -@trindex dist-shar - @item @option{dist-zip} @cindex Option, @option{dist-zip} @opindex dist-zip Hook @code{dist-zip} to @code{dist}. @trindex dist-zip -@item @option{dist-tarZ} -@cindex Option, @option{dist-tarZ} -@opindex dist-tarZ -Hook @code{dist-tarZ} to @code{dist}. -@trindex dist-tarZ - @item @option{filename-length-max=99} @cindex Option, @option{filename-length-max=99} @opindex filename-length-max=99 @@ -10112,7 +10092,7 @@ 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-zip} options in use.) These options must be passed as arguments to @code{AM_INIT_AUTOMAKE} (@pxref{Macros}) because they can require additional configure checks. @@ -12843,11 +12823,11 @@ suite failures, please attach the @file{test-suite.log} file. @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 diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index df84423c3..d24fd244d 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -272,8 +272,6 @@ sub _is_valid_easy_option ($) dejagnu dist-bzip2 dist-lzip - dist-shar - dist-tarZ dist-xz dist-zip ng @@ -331,6 +329,16 @@ sub _process_option_list (\%@) error ($where, "support for lzma-compressed distribution " . "archives has been removed"); } + elsif ($_ eq 'dist-tarZ') + { + error ($where, "distribution archives compressed with legacy " . + "'compress' program are no more supported"); + } + elsif ($_ eq 'dist-shar') + { + error ($where, "support for shar distribution archives has " . + "been removed"); + } elsif (/^filename-length-max=(\d+)$/) { delete $options->{$_}; diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk index b35899737..759928a3f 100644 --- a/lib/am/distcheck.mk +++ b/lib/am/distcheck.mk @@ -33,10 +33,6 @@ distcheck: dist 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 diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 35d9a71b5..f687f1849 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -317,8 +317,6 @@ am.dist.ext.gzip = tar.gz am.dist.ext.bzip2 = tar.bz2 am.dist.ext.xz = tar.xz am.dist.ext.lzip = tar.lz -am.dist.ext.tarZ = tar.Z -am.dist.ext.shar = shar.gz am.dist.ext.zip = zip DIST_TARGETS = $(foreach x,$(am.dist.formats),dist-$x) @@ -344,14 +342,6 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - dist-zip: distdir rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) diff --git a/t/dist-formats.tap b/t/dist-formats.tap index 880fcae07..842ecf1c3 100755 --- a/t/dist-formats.tap +++ b/t/dist-formats.tap @@ -20,7 +20,7 @@ am_create_testdir=empty . ./defs || exit 1 -plan_ 70 +plan_ 59 # ---------------------------------------------------- # # Common and/or auxiliary subroutines and variables. # @@ -46,12 +46,10 @@ setup_vars_for_compression_format () suffix=NONE compressor=NONE case $1 in gzip) suffix=tar.gz compressor=gzip ;; - tarZ) suffix=tar.Z compressor=compress ;; lzip) suffix=tar.lz compressor=lzip ;; xz) suffix=tar.xz compressor=xz ;; bzip2) suffix=tar.bz2 compressor=bzip2 ;; zip) suffix=zip compressor=zip ;; - shar) suffix=shar.gz compressor=shar ;; *) fatal_ "invalid compression format '$1'";; esac } @@ -103,7 +101,7 @@ have_compressor () fatal_ "have_compressor(): dead code reached" } -all_compression_formats='gzip tarZ lzip xz bzip2 zip shar' +all_compression_formats='gzip lzip xz bzip2 zip' all_compressors=$( for x in $all_compression_formats; do @@ -293,9 +291,8 @@ END # $1 $2 $3 $4 $5 $6 nogzip in am and bzip2 in am -nogzip in ac and xz in am -nogzip in am and lzip in ac -nogzip in ac and tarZ in ac +nogzip in ac and xz in ac +nogzip in am and lzip in am # ----------------------------------------------------------- # @@ -318,9 +315,9 @@ end_subtest # since there are the most likely to be all found on the great majority # of systems. -start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-tarZ +start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-xz -desc=gzip+bzip2+tarZ +desc=gzip+bzip2+xz tarname=parallel-compression-1.0 check_tarball () @@ -356,7 +353,7 @@ else ls -l # For debugging. command_ok_ "$desc [check .tar.gz tarball]" check_tarball gzip command_ok_ "$desc [check .tar.bz2 tarball]" check_tarball bzip2 - command_ok_ "$desc [check .tar.Z tarball]" check_tarball tarZ + command_ok_ "$desc [check .tar.Z tarball]" check_tarball xz fi unset tarname desc skip_reason diff --git a/t/lzma.sh b/t/dist-obsolete.sh old mode 100755 new mode 100644 similarity index 73% rename from t/lzma.sh rename to t/dist-obsolete.sh index da38c3173..a7b68d02a --- a/t/lzma.sh +++ b/t/dist-obsolete.sh @@ -14,28 +14,28 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Check support for no-dist-gzip with lzma. +# Obsolete archive formats. . ./defs || exit 1 -errmsg='support for lzma.*removed' +$ACLOCAL -echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am -$ACLOCAL --force -AUTOMAKE_fails -Wnone -Wno-error -grep "^Makefile\\.am:1:.*$errmsg" stderr +for fmt in lzma shar; do + echo AUTOMAKE_OPTIONS = dist-$fmt > Makefile.am + AUTOMAKE_fails -Wnone -Wno-error + grep "^Makefile\\.am:1:.*support for $fmt.*removed" stderr +done + +rm -rf autom4te*.cache cat > configure.ac << 'END' AC_INIT([lzma], [1.0]) -AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma]) +AM_INIT_AUTOMAKE([dist-tarZ]) AC_CONFIG_FILES([Makefile]) -AC_OUTPUT END : > Makefile.am - -rm -rf autom4te*.cache $ACLOCAL AUTOMAKE_fails -Wnone -Wno-error -grep "^configure\\.ac:2:.*$errmsg" stderr +grep "^configure\\.ac:2:.*legacy 'compress' program.* no more supported" stderr :