diff --git a/Makefile.in b/Makefile.in index d5ae72e..7f8b810 100644 --- a/Makefile.in +++ b/Makefile.in @@ -534,6 +534,10 @@ dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -563,6 +567,8 @@ distcheck: dist bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -720,18 +726,19 @@ 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-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 install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook + dist-hook 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 \ + install-exec install-exec-am install-exec-hook install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ + uninstall-hook install-exec-hook: diff --git a/automake.in b/automake.in index ac1c8c2..24bb193 100755 --- a/automake.in +++ b/automake.in @@ -3723,7 +3723,7 @@ sub handle_dist () { my $archive_defined = option 'no-dist-gzip' ? 0 : 1; $archive_defined ||= - grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma); + grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz); error (option 'no-dist-gzip', "no-dist-gzip specified but no dist-* specified, " . "at least one archive format must be enabled") @@ -6631,6 +6631,7 @@ sub make_paragraphs ($%) 'MAINTAINER-MODE' => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '', + 'XZ' => !! option 'dist-xz', 'LZMA' => !! option 'dist-lzma', 'BZIP2' => !! option 'dist-bzip2', 'COMPRESS' => !! option 'dist-tarZ', diff --git a/doc/automake.texi b/doc/automake.texi index 2fe3adb..8797d33 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -8251,14 +8251,20 @@ 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. +Generate an @samp{lzma} tar archive of the distribution. @command{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 +@item @code{dist-xz} +Generate an @samp{xz} tar archive of the distribution. @command{xz} +archives are frequently smaller than @command{bzip2}-compressed archives. +The @samp{xz} format will soon (early 2009) displace the @samp{lzma} format. +@trindex dist-xz + @item @code{dist-zip} Generate a zip archive of the distribution. @trindex dist-zip @@ -12319,4 +12325,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 +@c LocalWords: barexec Pinard's automatize initialize lzma xz diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index 1705981..5750cd1 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2006, 2007, 2008 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 @@ -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-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 6f48293..218e65a 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -304,6 +304,12 @@ dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) +?XZ?DIST_ARCHIVES += $(distdir).tar.xz +.PHONY: dist-xz +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z .PHONY: dist-tarZ dist-tarZ: distdir @@ -341,6 +347,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 ?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 ?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ?ZIP? -rm -f $(distdir).zip @@ -368,6 +375,8 @@ distcheck: dist bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 46fe0d5..9f9dc32 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -654,6 +654,7 @@ werror.test \ werror2.test \ whoami.test \ xsource.test \ +xz.test \ yacc.test \ yacc2.test \ yacc3.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 57451a2..64668e0 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -807,6 +807,7 @@ werror.test \ werror2.test \ whoami.test \ xsource.test \ +xz.test \ yacc.test \ yacc2.test \ yacc3.test \ diff --git a/tests/xz.test b/tests/xz.test new file mode 100755 index 0000000..93f4630 --- /dev/null +++ b/tests/xz.test @@ -0,0 +1,41 @@ +#! /bin/sh +# Copyright (C) 2008 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 3, 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 xz + +required=xz +. ./defs || Exit 1 + +set -e + +cat > configure.in << 'END' +AC_INIT([xz], [1.0]) +AM_INIT_AUTOMAKE([no-dist-gzip dist-xz]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +cat > Makefile.am << 'END' +test: distcheck + test $(DIST_ARCHIVES) = xz-1.0.tar.xz + test -f $(DIST_ARCHIVES) +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE test