Index: ChangeLog from Akim Demaille * automake.in (make_paragraphs): Define %GZIP%. (process_option_list): Accept no-dist-gzip2. * lib/am/distdir.am (dist-gzip): Now conditioned by %GZIP%. (distcheck): Depend upon distdir, not dist. Run make dist at the end. * automake.texi (Options): Adjust. Index: NEWS =================================================================== RCS file: /cvs/automake/automake/NEWS,v retrieving revision 1.215 diff -u -u -r1.215 NEWS --- NEWS 2 Jun 2003 07:08:39 -0000 1.215 +++ NEWS 10 Jun 2003 11:43:21 -0000 @@ -121,6 +121,10 @@ Autom4te's cache isn't needlessly invalidated. This behavior can be switched off with the new `--force' option. +* New option no-dist-gzip. + +* Targets dist-gzip, dist-bzip2, dist-tarZ, dist-zip are always defined. + New in 1.7: * Autoconf 2.54 is required. Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1466 diff -u -u -r1.1466 automake.in --- automake.in 5 Jun 2003 20:33:04 -0000 1.1466 +++ automake.in 10 Jun 2003 11:43:21 -0000 @@ -1371,7 +1371,7 @@ # $BOOL # process_option_list ($CONFIG, @OPTIONS) -# ------------------------------ +# --------------------------------------- # Process a list of options. Return 1 on error, 0 otherwise. # This is a helper for handle_options. CONFIG is true if we're # handling global options. @@ -1379,7 +1379,7 @@ { my ($config, @list) = @_; - # FIXME: We should disallow conditional deffinitions of AUTOMAKE_OPTIONS. + # FIXME: We should disallow conditional definitions of AUTOMAKE_OPTIONS. my $where = ($config ? $seen_init_automake : rvar ('AUTOMAKE_OPTIONS')->rdef (TRUE)->location); @@ -1405,6 +1405,7 @@ elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo' || $_ eq 'dist-shar' || $_ eq 'dist-zip' || $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2' + || $_ eq 'no-dist-gzip' || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex' || $_ eq 'readme-alpha' || $_ eq 'check-news' || $_ eq 'subdir-objects' || $_ eq 'nostdinc' @@ -3826,6 +3827,20 @@ # Omit the rules so that people don't try to use them. return if $cygnus_mode; + # At least one of the archive formats must be enabled. + if ($relative_dir eq '.') + { + my $archive_defined = $options{'no-dist-gzip'} ? 0 : 1; + $archive_defined ||= + grep { $options{"dist-$_"} } ('shar', 'zip', 'tarZ', 'bzip2'); + # FIXME: Is there a means to issue an error message related to + # AUTOMAKE_OPTIONS? + error ("at least one archive format must be enabled " + . "(no-dist-gzip specified but no dist-* specified " + . "in AUTOMAKE_OPTIONS)") + unless $archive_defined; + } + # Look for common files that should be included in distribution. # If the aux dir is set, and it does not have a Makefile.am, then # we check for these files there as well. @@ -6644,10 +6659,11 @@ 'MAINTAINER-MODE' => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '', - 'SHAR' => $options{'dist-shar'} || 0, 'BZIP2' => $options{'dist-bzip2'} || 0, - 'ZIP' => $options{'dist-zip'} || 0, 'COMPRESS' => $options{'dist-tarZ'} || 0, + 'GZIP' => $options{'no-dist-gzip'} ? 0 : 1, + 'SHAR' => $options{'dist-shar'} || 0, + 'ZIP' => $options{'dist-zip'} || 0, 'INSTALL-INFO' => !$options{'no-installinfo'}, 'INSTALL-MAN' => !$options{'no-installman'}, Index: automake.texi =================================================================== RCS file: /cvs/automake/automake/automake.texi,v retrieving revision 1.339 diff -u -u -r1.339 automake.texi --- automake.texi 22 May 2003 20:44:11 -0000 1.339 +++ automake.texi 10 Jun 2003 11:43:22 -0000 @@ -4754,9 +4754,36 @@ @section The types of distributions @trindex dist-gzip -Automake generates a @samp{.tar.gz} file when asked to create a -distribution and other archives formats, @ref{Options}. The target address@hidden generates the @samp{.tar.gz} file only. +Automake generates targets to provide archives of the project for +distributions in various formats. These targets are: + address@hidden @asis address@hidden @code{dist-bzip2} +Generate a bzip2 tar archive of the distribution. bzip2 archives are +frequently smaller than gzipped archives. address@hidden dist-bzip2 + address@hidden @code{dist-gzip} +Generate a gzip tar archive of the distribution. address@hidden dist-gzip + address@hidden @code{dist-shar} +Generate a shar archive of the distribution. address@hidden dist-shar + address@hidden @code{dist-zip} +Generate a zip archive of the distribution. address@hidden dist-zip + address@hidden @code{dist-tarZ} +Generate a compressed tar archive of +the distribution. address@hidden dist-tarZ address@hidden table + +The targets @code{dist} and its synonym @code{dist-all} will create +archives in all the enabled formats, @ref{Options}. By default, only +the @code{dist-gzip} target is hooked to @code{dist}. @node Tests, Options, Dist, Top @@ -4905,30 +4932,22 @@ @item @code{dist-bzip2} @cindex Option, dist-bzip2 -Generate a @code{dist-bzip2} target, creating a bzip2 tar archive of the -distribution. @code{dist} will create it in addition to the other -formats. bzip2 archives are frequently smaller than gzipped archives. +Hook @code{dist-bzip2} to @code{dist}. @trindex dist-bzip2 @item @code{dist-shar} @cindex Option, dist-shar -Generate a @code{dist-shar} target, creating a shar archive of the -distribution. @code{dist} will create it in addition to the other -formats. +Hook @code{dist-shar} to @code{dist}. @trindex dist-shar @item @code{dist-zip} @cindex Option, dist-zip -Generate a @code{dist-zip} target, creating a zip archive of the -distribution. @code{dist} will create it in addition to the other -formats. +Hook @code{dist-zip} to @code{dist}. @trindex dist-zip @item @code{dist-tarZ} @cindex Option, dist-tarZ -Generate a @code{dist-tarZ} target, creating a compressed tar archive of -the distribution. @code{dist} will create it in addition to the other -formats. +Hook @code{dist-tarZ} to @code{dist}. @trindex dist-tarZ @item @code{no-define} @@ -4943,6 +4962,11 @@ is useful for those situations where you don't have the necessary bits to make automatic dependency tracking work @xref{Dependencies}. In this case the effect is to effectively disable automatic dependency tracking. + address@hidden @code{no-dist-gzip} address@hidden Option, no-dist-gzip +Do not hook @code{dist-gzip} to @code{dist}. address@hidden no-dist-gzip @item @code{no-exeext} @cindex Option, no-exeext Index: stamp-vti =================================================================== RCS file: /cvs/automake/automake/stamp-vti,v retrieving revision 1.247 diff -u -u -r1.247 stamp-vti --- stamp-vti 2 Jun 2003 23:34:59 -0000 1.247 +++ stamp-vti 10 Jun 2003 11:43:22 -0000 @@ -1,4 +1,4 @@ address@hidden UPDATED 22 May 2003 address@hidden UPDATED-MONTH May 2003 address@hidden UPDATED 4 June 2003 address@hidden UPDATED-MONTH June 2003 @set EDITION 1.7a @set VERSION 1.7a Index: version.texi =================================================================== RCS file: /cvs/automake/automake/version.texi,v retrieving revision 1.319 diff -u -u -r1.319 version.texi --- version.texi 2 Jun 2003 23:34:59 -0000 1.319 +++ version.texi 10 Jun 2003 11:43:22 -0000 @@ -1,4 +1,4 @@ address@hidden UPDATED 22 May 2003 address@hidden UPDATED-MONTH May 2003 address@hidden UPDATED 4 June 2003 address@hidden UPDATED-MONTH June 2003 @set EDITION 1.7a @set VERSION 1.7a Index: lib/am/distdir.am =================================================================== RCS file: /cvs/automake/automake/lib/am/distdir.am,v retrieving revision 1.46 diff -u -u -r1.46 distdir.am --- lib/am/distdir.am 15 Apr 2003 20:40:31 -0000 1.46 +++ lib/am/distdir.am 10 Jun 2003 11:43:22 -0000 @@ -213,43 +213,37 @@ if %?TOPDIR_P% +?GZIP?am_dist_archives += $(distdir).tar.gz GZIP_ENV = --best .PHONY: dist-gzip dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) -if %?BZIP2% +?BZIP2?am_dist_archives += $(distdir).tar.bz2 .PHONY: dist-bzip2 dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) -endif %?BZIP2% - -if %?COMPRESS% +?COMPRESS?am_dist_archives += $(distdir).tar.Z .PHONY: dist-tarZ dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z $(am__remove_distdir) -endif %?COMPRESS% - -if %?SHAR% +?SHAR?am_dist_archives += $(distdir).shar.gz .PHONY: dist-shar dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) -endif %?SHAR% - -if %?ZIP% +?ZIP?am_dist_archives += $(distdir).zip .PHONY: dist-zip dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) -endif %?ZIP% endif %?TOPDIR_P% @@ -266,7 +260,7 @@ .PHONY: dist dist-all dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +?GZIP? $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ?BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ?COMPRESS? $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z ?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz @@ -288,8 +282,18 @@ # tarfile. .PHONY: distcheck distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + case '$(am_dist_archives)' in \ + *.tar.gz) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ + *.zip) \ + unzip $(distdir).zip ;;\ + esac ## Make the new source tree read-only. Distributions ought to work in ## this case. However, make the top-level directory writable so we ## can make our new subdirs. @@ -340,14 +344,15 @@ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ -## Make sure to remove the dist file we created in the test build + && $(MAKE) $(AM_MAKEFLAGS) distdir \ +## Make sure to remove the dist dir we created in the test build ## directory. - && rm -f $(distdir).tar.gz \ + && rm -rf $(distdir) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + $(MAKE) $(AM_MAKEFLAGS) dist + @(echo "$(distdir) archives ready for distribution: "; \ + for i in $(am_dist_archives); do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x}' -e '$${p;x}' ## Define distuninstallcheck_listfiles and distuninstallcheck separately ## from distcheck, so that they can be overridden by the user.