Add lzip compression support.
authorAntonio Diaz Diaz <ant_diaz@teleline.es>
Wed, 24 Feb 2010 18:41:59 +0000 (19:41 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 24 Feb 2010 18:41:59 +0000 (19:41 +0100)
* automake.in (handle_dist): Recognize dist-lzip.
(make_paragraphs): Map LZIP to dist-lzip.
* doc/automake.texi (Dist): Add dist-lzip.
(Options): Likewise.
* lib/Automake/Options.pm (_process_option_list): Add dist-lzip.
* lib/am/distdir.am
(dist dist-all): Add command to create an lzip-compressed tarball.
(distcheck): Handle lzip-compressed tarballs just like the others.
* tests/defs.in: Test for lzip, too.
* tests/lzip.test: New file, based on nogzip.test.
* tests/Makefile.am (TESTS): Add lzip.test.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
Makefile.in
NEWS
automake.in
doc/automake.texi
lib/Automake/Options.pm
lib/am/distdir.am
tests/Makefile.am
tests/Makefile.in
tests/lzip.test [new file with mode: 0755]

index e6df597..d702c91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-24  Antonio Diaz Diaz  <ant_diaz@teleline.es>  (tiny change)
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Add lzip compression support.
+       * automake.in (handle_dist): Recognize dist-lzip.
+       (make_paragraphs): Map LZIP to dist-lzip.
+       * doc/automake.texi (Dist): Add dist-lzip.
+       (Options): Likewise.
+       * lib/Automake/Options.pm (_process_option_list): Add dist-lzip.
+       * lib/am/distdir.am
+       (dist dist-all): Add command to create an lzip-compressed tarball.
+       (distcheck): Handle lzip-compressed tarballs just like the others.
+       * tests/defs.in: Test for lzip, too.
+       * tests/lzip.test: New file, based on nogzip.test.
+       * tests/Makefile.am (TESTS): Add lzip.test.
+       * NEWS: Update.
+
 2010-02-22  Karl Berry  <karl@gnu.org>
 
        Improve help message of mdate-sh.
index 9088a0b..dcca05f 100644 (file)
@@ -605,6 +605,10 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+       $(am__remove_distdir)
+
 dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
        $(am__remove_distdir)
@@ -642,6 +646,8 @@ distcheck: dist
          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*) \
@@ -818,8 +824,8 @@ uninstall-am: uninstall-binSCRIPTS
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-generic \
        ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-       dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-       distcheck distclean distclean-generic distclean-tags \
+       dist-hook dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-generic distclean-tags \
        distcleancheck distdir distuninstallcheck dvi dvi-am html \
        html-am info info-am install install-am install-binSCRIPTS \
        install-data install-data-am install-dvi install-dvi-am \
diff --git a/NEWS b/NEWS
index a3ce191..5374770 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ New in 1.11.0a:
   - The `lzma' compression scheme and associated automake option `dist-lzma'
     is obsoleted by `xz' and `dist-xz' due to upstream changes.
 
+  - "make dist" can now create lzip-compressed tarballs.
+
 Bugs fixed in 1.11.0a:
 
 * Bugs introduced by 1.11:
index 8692d61..0a10abd 100755 (executable)
@@ -3895,7 +3895,7 @@ sub handle_dist ()
     {
       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 @@ sub make_paragraphs ($%)
 
                 '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',
index f319075..185652e 100644 (file)
@@ -8441,6 +8441,11 @@ frequently smaller than gzipped archives.
 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.
@@ -8991,6 +8996,12 @@ Cause @command{dejagnu}-specific rules to be generated.  @xref{DejaGnu Tests}.
 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
@@ -9263,7 +9274,8 @@ In order to use this option with C sources, you should add
 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-xz} and @option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzip}, @option{dist-tarZ} and
+@option{dist-xz} options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -12921,4 +12933,4 @@ parentheses is the number of generated test cases.
 @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
index cacc7d2..8d004d9 100644 (file)
@@ -259,7 +259,7 @@ sub _process_option_list (\%$@)
       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'
index ec4d5e5..ad051c3 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-## Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+## 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
@@ -344,6 +344,12 @@ dist-bzip2: distdir
        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 @@ endif %?SUBDIRS%
 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 @@ distcheck: dist
          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*) \
index 4b73a62..67c162b 100644 (file)
@@ -445,6 +445,7 @@ ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 maintclean.test \
 make.test \
index 709739e..d53423c 100644 (file)
@@ -680,6 +680,7 @@ ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 maintclean.test \
 make.test \
diff --git a/tests/lzip.test b/tests/lzip.test
new file mode 100755 (executable)
index 0000000..fecbc83
--- /dev/null
@@ -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