summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--automake.in3
-rw-r--r--doc/automake.texi16
-rw-r--r--lib/Automake/Options.pm2
-rw-r--r--lib/am/distdir.am9
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/lzip.test43
7 files changed, 72 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 0c0a2dc25..7b3dedf54 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ New in 1.11.0a:
* Miscellaneous changes:
+ - "make dist" can now create lzip-compressed tarballs.
+
- In the Automake info documentation, the Top node and the nodes about
the invocation of the automake and aclocal programs have been renamed;
now, calling "info automake" will open the Top node, while calling
diff --git a/automake.in b/automake.in
index 7efb7d510..f235c9dca 100644
--- a/automake.in
+++ b/automake.in
@@ -3921,7 +3921,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")
@@ -7122,6 +7122,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',
diff --git a/doc/automake.texi b/doc/automake.texi
index a690b6758..4bae611b1 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8666,6 +8666,11 @@ environment variable. For example, @samp{make dist-bzip2 BZIP2=-7}.
Generate a gzip tar archive of the distribution.
@trindex dist-gzip
+@item @code{dist-lzip}
+Generate a @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.
@@ -9278,6 +9283,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
@@ -9478,7 +9489,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-xz} 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.
@@ -13542,4 +13554,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
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index b7ff3d1f5..388d4b901 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -264,7 +264,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'
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index f685ec1a2..a681101e0 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -344,6 +344,12 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
+.PHONY: dist-lzip
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(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=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+?LZIP? tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
?LZMA? tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
?XZ? tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} 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*) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 21afdf465..2f1ac0d48 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -550,6 +550,7 @@ ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
ltorder.test \
+lzip.test \
lzma.test \
m4-inclusion.test \
maintclean.test \
diff --git a/tests/lzip.test b/tests/lzip.test
new file mode 100644
index 000000000..ab629901a
--- /dev/null
+++ b/tests/lzip.test
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2011 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
+
+: