[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: no-dist-gzip
From: |
Alexandre Duret-Lutz |
Subject: |
Re: no-dist-gzip |
Date: |
Tue, 10 Jun 2003 19:54:26 +0200 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3 (gnu/linux) |
>>> "Akim" == Akim Demaille <address@hidden> writes:
[...]
>> I think it would be a useful to let Automake output a variable
>> with the list of archives constructed by dist. Maybe something
>> like
>> DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
>> But this is another story.
Akim> I did that, but I did not have in mind you wanted that
Akim> guy to be public. I don't see the point actually. What
Akim> will you do if the user defines it?
My idea was that DIST_ARCHIVES would help people who write
custom release rules around `make distcheck' or `make dist'.
For instance `make upload'.
I didn't thought about users overriding this variable.
Now that you mention it, I think that if your extraction
switch/case was moved into a separate target (undist?),
one could build some exotic archive by just redefining
dist, undist, and DIST_ARCHIVES.
Perhaps dist could even be changed to loop over DIST_ARCHIVES.
This would allow DIST_ARCHIVES to be defined conditionally or
overridden at make time.
(Right now I think only the idea in the first of these
paragraphs is really useful.)
[...]
| Index: ChangeLog
| from Akim Demaille <address@hidden>
|
| * 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.
This comes straight from the previous patch, doesn't it?
[...]
| + 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;
`cvs up' and $options{'no-dist-gzip'} should now contain the
Location of its definition (either in AUTOMAKE_OPTIONS or
AM_INIT_AUTOMAKE). You could use something like
error ($options{'no-dist-gzip'},
"no-dist-gzip specified but no dist-* specified, "
. "at least one archive format must be enabled")
Preferably with a test case to prevent errors similar to those
you recently reported.
BTW, does anybody know good coverage testing tools for Perl? I
think it would be interesting to augment the test suite so that
each Automake statement is at least run once.
[...]
| --- 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
This one can be removed because ...
| -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
... you add it here.
[...]
| +?GZIP?am_dist_archives += $(distdir).tar.gz
That should be am__dist_archives if it's meant to be a private variable.
(Or DIST_ARCHIVES otherwise, but I can work on this another day.)
[...]
| - && $(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) \
How about
$(MAKE) $(AM_MAKEFLAGS) dist
rm -f $(am__dist_archives)
? This looks closer to what users do.
| - @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}'
The call to `make dist' seems to be a leftover from the previous patch.
--
Alexandre Duret-Lutz