Hello,

Ralf Wildenhues wrote:
Do you plan to support the creation of lzip-compressed tarballs?
http://lists.gnu.org/archive/html/automake/2008-11/msg00076.html

Well, to be honest, I regard the addition of lzma support as a mistake
in hindsight.  We should have waited and added xz support only, with a
stable xz release.  It was also a mistake that I did not deprecate lzma
support more prominently in the 1.11 release; will fix that for 1.11.1.

It seems this has not been fixed in 1.11.1.


In general, adding support for a new compression format Foo to Automake
incurs several costs, at least with the current way we do things:

Given the simplicity of the changes needed (see attached patch), I see no reason for not supporting lzip, which some developers[1] already dub "the currently best free compression program".
[1] ftp://ftp.gmplib.org/pub/snapshot/README


Best regards,
Antonio.
diff -urdN automake-1.11.1/automake.in automake-1.11.1.new/automake.in
--- automake-1.11.1/automake.in	2009-12-08 19:15:40.000000000 +0100
+++ automake-1.11.1.new/automake.in	2010-02-15 13:24:12.000000000 +0100
@@ -3895,7 +3895,7 @@
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-	grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz);
+	grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
       error (option 'no-dist-gzip',
 	     "no-dist-gzip specified but no dist-* specified, "
 	     . "at least one archive format must be enabled")
@@ -7049,6 +7049,7 @@
 
 		 'XZ'          => !! option 'dist-xz',
 		 'LZMA'        => !! option 'dist-lzma',
+		 'LZIP'        => !! option 'dist-lzip',
 		 'BZIP2'       => !! option 'dist-bzip2',
 		 'COMPRESS'    => !! option 'dist-tarZ',
 		 'GZIP'        =>  ! option 'no-dist-gzip',
diff -urdN automake-1.11.1/doc/automake.texi automake-1.11.1.new/doc/automake.texi
--- automake-1.11.1/doc/automake.texi	2009-12-08 19:15:40.000000000 +0100
+++ automake-1.11.1.new/doc/automake.texi	2010-02-15 13:24:12.000000000 +0100
@@ -8440,6 +8440,11 @@
 Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
+...@item @code{dist-lzip}
+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-lzma}
 Generate an @samp{lzma} tar archive of the distribution.  @command{lzma}
 archives are frequently smaller than @command{bzip2}-compressed archives.
@@ -8988,6 +8993,12 @@
 Hook @code{dist-bzip2} to @code{dist}.
 @trindex dist-bzip2
 
+...@item @option{dist-lzip}
+...@cindex Option, @option{dist-lzip}
+...@opindex dist-lzip
+Hook @code{dist-lzip} to @code{dist}.
+...@trindex dist-lzip
+
 @item @option{dist-lzma}
 @cindex Option, @option{dist-lzma}
 @opindex dist-lzma
@@ -9260,7 +9271,8 @@
 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-lzma} and @option{dist-tarZ} options in use.)
+...@option{dist-bzip2}, @option{dist-lzip}, @option{dist-lzma} and
+...@option{dist-tarz} options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -12920,4 +12932,4 @@
 @c  LocalWords:  LTALLOCA MALLOC malloc memcmp strdup alloca libcompat xyz DFOO
 @c  LocalWords:  unprefixed buildable preprocessed DBAZ DDATADIR WARNINGCFLAGS
 @c  LocalWords:  LIBFOOCFLAGS LIBFOOLDFLAGS ftable testSubDir obj LIBTOOLFLAGS
-...@c  LocalWords:  barexec Pinard's automatize initialize lzma xz
+...@c  LocalWords:  barexec Pinard's automatize initialize lzip lzma xz
diff -urdN automake-1.11.1/lib/Automake/Options.pm automake-1.11.1.new/lib/Automake/Options.pm
--- automake-1.11.1/lib/Automake/Options.pm	2009-12-08 19:02:32.000000000 +0100
+++ automake-1.11.1.new/lib/Automake/Options.pm	2010-02-15 13:24:12.000000000 +0100
@@ -259,7 +259,7 @@
       elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
 	     || $_ eq 'dist-shar' || $_ eq 'dist-zip'
 	     || $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
-	     || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
+	     || $_ eq 'dist-lzip' || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
 	     || $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
 	     || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
 	     || $_ eq 'readme-alpha' || $_ eq 'check-news'
diff -urdN automake-1.11.1/lib/am/distdir.am automake-1.11.1.new/lib/am/distdir.am
--- automake-1.11.1/lib/am/distdir.am	2009-12-08 19:15:40.000000000 +0100
+++ automake-1.11.1.new/lib/am/distdir.am	2010-02-15 13:24:12.000000000 +0100
@@ -344,6 +344,12 @@
 	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
 	$(am__remove_distdir)
 
+?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
+.PHONY: dist-lzip
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+	$(am__remove_distdir)
+
 ?LZMA?DIST_ARCHIVES += $(distdir).tar.lzma
 .PHONY: dist-lzma
 dist-lzma: distdir
@@ -396,6 +402,7 @@
 dist dist-all: distdir
 ?GZIP?	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 ?BZIP2?	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+?LZIP?	tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
 ?LZMA?	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 ?XZ?	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
 ?COMPRESS?	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
@@ -429,6 +436,8 @@
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lzma*) \
 	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
 	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
diff -urdN automake-1.11.1/tests/Makefile.am automake-1.11.1.new/tests/Makefile.am
--- automake-1.11.1/tests/Makefile.am	2009-12-08 19:15:40.000000000 +0100
+++ automake-1.11.1.new/tests/Makefile.am	2010-02-15 13:24:12.000000000 +0100
@@ -423,6 +423,7 @@
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 maintclean.test \
 make.test \
diff -urdN automake-1.11.1/tests/lzip.test automake-1.11.1.new/tests/lzip.test
--- automake-1.11.1/tests/lzip.test	1970-01-01 01:00:00.000000000 +0100
+++ automake-1.11.1.new/tests/lzip.test	2010-02-15 13:24:12.000000000 +0100
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2010  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# 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 lzip
+
+required=lzip
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([lzip], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzip])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+	test $(DIST_ARCHIVES) = lzip-1.0.tar.lz
+	test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test

Reply via email to