]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Add lzma compression support.
authorJim Meyering <jim@meyering.net>
Tue, 9 Oct 2007 14:52:20 +0000 (14:52 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 9 Oct 2007 14:52:20 +0000 (14:52 +0000)
* NEWS: Mention it.
* automake.in (handle_dist): Recognize dist-lzma.
(make_paragraphs): Map LZMA to dist-lzma.
* doc/automake.texi (Dist): Add dist-lzma.
(Options): Likewise.
* lib/Automake/Options.pm (_process_option_list):
* lib/am/distdir.am (dist-lzma): New rule.
(dist dist-all): Add command to create an lzma-compressed tarball.
(distcheck): Handle lzma-compressed tarballs just like the others.
* tests/defs.in: Test for lzma, too.
* tests/lzma.test: New file, based on nogzip.test.
* tests/Makefile.am (TESTS): Add lzma.test.
* tests/Makefile.in: Regenerate.
Suggestion from Karl Berry.

Author: Jim Meyering <meyering@redhat.com>

NEWS
automake.in
doc/automake.texi
lib/Automake/Options.pm
lib/am/distdir.am
tests/Makefile.am
tests/Makefile.in
tests/lzma.test [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index 6304757ec3c2c7de8b8c6c81c2984ebeb8c5adfd..2e08a8f807ffce6f862466f1b920fcc57334a182 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ New in 1.10a:
 
 * Miscellaneous changes:
 
+  - "make dist" can now create lzma-compressed tarballs.
+
   - Automake is licensed under GPLv3+.  `automake --add-missing' will
     by default install the GPLv3 file as COPYING if it is missing.
     Note that Automake will never overwrite an existing COPYING file,
index 47023ba2bba0b16fa33318340ccc2401af7d7164..234947b361b55efb364b1c9a3de8eab19ff07d17 100755 (executable)
@@ -3613,7 +3613,7 @@ sub handle_dist ()
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-       grep { option "dist-$_" } ('shar', 'zip', 'tarZ', 'bzip2');
+       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma);
       error (option 'no-dist-gzip',
             "no-dist-gzip specified but no dist-* specified, "
             . "at least one archive format must be enabled")
@@ -6446,6 +6446,7 @@ sub make_paragraphs ($%)
                 'MAINTAINER-MODE'
                 => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
 
+                'LZMA'        => !! option 'dist-lzma',
                 'BZIP2'       => !! option 'dist-bzip2',
                 'COMPRESS'    => !! option 'dist-tarZ',
                 'GZIP'        =>  ! option 'no-dist-gzip',
index b3361d334638b431c043bd319664fdccdf381972..805a2b8b2ad71246bfcc7ac2f8cfb05deffd5baf 100644 (file)
@@ -8082,6 +8082,11 @@ frequently smaller than gzipped archives.
 Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
+@item @code{dist-lzma}
+Generate a lzma tar archive of the distribution.  lzma archives are
+frequently smaller than @command{bzip2}-compressed archives.
+@trindex dist-lzma
+
 @item @code{dist-shar}
 Generate a shar archive of the distribution.
 @trindex dist-shar
@@ -8369,6 +8374,12 @@ Cause @command{dejagnu}-specific rules to be generated.  @xref{Tests}.
 Hook @code{dist-bzip2} to @code{dist}.
 @trindex dist-bzip2
 
+@item @option{dist-lzma}
+@cindex Option, @option{dist-lzma}
+@opindex dist-lzma
+Hook @code{dist-lzma} to @code{dist}.
+@trindex dist-lzma
+
 @item @option{dist-shar}
 @cindex Option, @option{dist-shar}
 @opindex dist-shar
@@ -8540,7 +8551,7 @@ 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} and @option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzma} and @option{dist-tarZ} options in use.)
 
 These options must be passed as argument to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -12074,4 +12085,4 @@ The number of test cases in the test suite.
 @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
+@c  LocalWords:  barexec Pinard's automatize initialize lzma
index c4c87757a2d57fd1ddcdcbf2b62ec60ba8a2b823..a63f97ad6b2ae3a1d9503ac8784fadff9cf46cfc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007  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
@@ -261,6 +261,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 'no-dist-gzip' || $_ eq 'no-dist'
             || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
             || $_ eq 'readme-alpha' || $_ eq 'check-news'
index c62ef538bf5a01d6540867934a0e824e73a1bf65..ce547fd5ecb4ce6bb779ab645c980a6434faba75 100644 (file)
@@ -259,6 +259,12 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+?LZMA?DIST_ARCHIVES += $(distdir).tar.lzma
+.PHONY: dist-lzma
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
 .PHONY: dist-tarZ
 dist-tarZ: distdir
@@ -295,6 +301,7 @@ if %?TOPDIR_P%
 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
+?LZMA? tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 ?COMPRESS?     tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 ?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 ?ZIP?  -rm -f $(distdir).zip
@@ -320,6 +327,8 @@ distcheck: dist
          GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
index ee3534563bfcb1e5889aee5da8fe2e9ebe396865..436de6381c97746d18cdf28639cae5b6b2eee09c 100644 (file)
@@ -358,6 +358,7 @@ ltconv.test \
 ltdeps.test \
 ltlibobjs.test \
 ltlibsrc.test \
+lzma.test \
 maintclean.test \
 make.test \
 makej.test \
index 52a125a944bfae07e34df75fe7e266915c3cb912..6654ca9fb2d0538df947b233ca84bfa091a552fc 100644 (file)
@@ -491,6 +491,7 @@ ltconv.test \
 ltdeps.test \
 ltlibobjs.test \
 ltlibsrc.test \
+lzma.test \
 maintclean.test \
 make.test \
 makej.test \
diff --git a/tests/lzma.test b/tests/lzma.test
new file mode 100755 (executable)
index 0000000..bbfc6c2
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2003, 2007  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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 3, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Check support for no-dist-gzip with lzma
+
+required=lzma
+. ./defs || exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([lzma], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+       test $(DIST_ARCHIVES) = lzma-1.0.tar.lzma
+       test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test