* automake.in (&make_paragraphs): Define %GZIP%.
(&process_option_list): Accept no-dist-gzip2.
(&handle_dist): Complain when no archive format is enabled.
* lib/am/distdir.am (DIST_ARCHIVES): New variable.
(dist-gzip, dist-bzip2, dist-tarZ, dist-zip): No longer
conditioned.
(dist): Build $(distdir).tar.gz conditionally.
(distcheck): Use DIST_ARCHIVES to find an archive to unpack, and
to list built archives. Run $(MAKE) dist instead of dist-gzip.
* automake.texi (Options, The types of distributions): Adjust.
+2003-06-15 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&make_paragraphs): Define %GZIP%.
+ (&process_option_list): Accept no-dist-gzip2.
+ (&handle_dist): Complain when no archive format is enabled.
+ * lib/am/distdir.am (DIST_ARCHIVES): New variable.
+ (dist-gzip, dist-bzip2, dist-tarZ, dist-zip): No longer
+ conditioned.
+ (dist): Build $(distdir).tar.gz conditionally.
+ (distcheck): Use DIST_ARCHIVES to find an archive to unpack, and
+ to list built archives. Run $(MAKE) dist instead of dist-gzip.
+ * automake.texi (Options, The types of distributions): Adjust.
+
2003-06-15 Jens Elkner <elkner@imsgroup.de> (tiny change)
* m4/lispdir.m4 (AM_PATH_LISPDIR): Fix sed commands to work with
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.
+
\f
New in 1.7:
* Autoconf 2.54 is required.
# $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.
{
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);
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'
# 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');
+ error ($options{'no-dist-gzip'},
+ "no-dist-gzip specified but no dist-* specified, "
+ . "at least one archive format must be enabled")
+ 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.
'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'},
@section The types of distributions
+Automake generates targets to provide archives of the project for
+distributions in various formats. These targets are:
+
+@table @asis
+@item @code{dist-bzip2}
+Generate a bzip2 tar archive of the distribution. bzip2 archives are
+frequently smaller than gzipped archives.
+@trindex dist-bzip2
+
+@item @code{dist-gzip}
+Generate a gzip tar archive of the distribution.
@trindex dist-gzip
-Automake generates a @samp{.tar.gz} file when asked to create a
-distribution and other archives formats, @ref{Options}. The target
-@code{dist-gzip} generates the @samp{.tar.gz} file only.
+
+@item @code{dist-shar}
+Generate a shar archive of the distribution.
+@trindex dist-shar
+
+@item @code{dist-zip}
+Generate a zip archive of the distribution.
+@trindex dist-zip
+
+@item @code{dist-tarZ}
+Generate a compressed tar archive of
+the distribution.
+@trindex dist-tarZ
+@end 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
@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}
to make automatic dependency tracking work @xref{Dependencies}. In this
case the effect is to effectively disable automatic dependency tracking.
+@item @code{no-dist-gzip}
+@cindex Option, no-dist-gzip
+Do not hook @code{dist-gzip} to @code{dist}.
+@trindex no-dist-gzip
+
@item @code{no-exeext}
@cindex Option, no-exeext
If your @file{Makefile.am} defines a target @samp{foo}, it will override
if %?TOPDIR_P%
+?GZIP?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?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?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?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?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%
.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
# tarfile.
.PHONY: distcheck
distcheck: dist
- $(am__remove_distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ case '$(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.
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
-## directory.
- && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+## Make sure to remove the dists we created in the test build directory.
+ && rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
+ @(echo "$(distdir) archives ready for distribution: "; \
+ for i in $(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.
-@set UPDATED 22 May 2003
-@set UPDATED-MONTH May 2003
+@set UPDATED 11 June 2003
+@set UPDATED-MONTH June 2003
@set EDITION 1.7a
@set VERSION 1.7a
-@set UPDATED 22 May 2003
-@set UPDATED-MONTH May 2003
+@set UPDATED 11 June 2003
+@set UPDATED-MONTH June 2003
@set EDITION 1.7a
@set VERSION 1.7a