automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Automake-NG] [PATCH 1/7] [ng] dist: refactor: reduce duplication in


From: Akim Demaille
Subject: Re: [Automake-NG] [PATCH 1/7] [ng] dist: refactor: reduce duplication in the 'dist-*' recipes
Date: Mon, 3 Sep 2012 13:57:22 +0200

Le 12 août 2012 à 23:20, Stefano Lattarini a écrit :

> * lib/am/distcheck.mk: Here, with heavy refactorings, in particular
> introducing ...
> (am.dist.all-formats,
> am.dist.all-targets,
> am.dist.compress-cmd.gzip,
> am.dist.uncompress-cmd.gzip,
> am.dist.compress-cmd.bzip2,
> am.dist.uncompress-cmd.bzip2,
> am.dist.compress-cmd.lzip,
> am.dist.uncompress-cmd.lzip
> am.dist.compress-cmd.xz,
> am.dist.uncompress-cmd.xz,
> am.dist.create-cmd.zip,
> am.dist.extract-cmd.zip): ... these new internal variables ...
> (am.dist.create-archive-for-format.aux,
> am.dist.create-archive-for-format,
> am.dist.extract-archive-for-format.aux,
> am.dist.extract-archive-for-format): ... and these new internal
> make functions ...
> (am.dist-gzip, am.dist-bzip2, am.dist-lzip, am.dist-xz,
> am.dist.zip): ... and rewriting these rules as static-pattern
> rules sharing the same recipe ...
> (distcheck): ... and updating the recipe for this target.
> * t/dist-formats.tap: Little adjustments for better usefulness
> of verbose output when debugging.
> 
> Signed-off-by: Stefano Lattarini <address@hidden>
> ---
> lib/am/distcheck.mk | 103 +++++++++++++++++++++++++++++++++-------------------
> t/dist-formats.tap  |   2 +-
> 2 files changed, 67 insertions(+), 38 deletions(-)
> 
> diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk
> index 6569387..aec1500 100644
> --- a/lib/am/distcheck.mk
> +++ b/lib/am/distcheck.mk
> @@ -16,6 +16,9 @@
> #  Building various distribution flavors.  #
> # ---------------------------------------- #
> 
> +# ----------------------------------------------------------------------
> +# FIXME: how and where are these old comments still relevant?
> +# ----------------------------------------------------------------------
> # Note that we don't use GNU tar's '-z' option.  One reason (but
> # not the only reason) is that some versions of tar (e.g., OSF1)
> # interpret '-z' differently.
> @@ -26,37 +29,73 @@
> # with tar 1.11.2).  We do not do anything specific w.r.t. this
> # incompatibility since packages where empty directories need to be
> # present in the archive are really unusual.
> +# ----------------------------------------------------------------------
> 
> -am.dist.ext.gzip  = tar.gz
> -am.dist.ext.bzip2 = tar.bz2
> -am.dist.ext.xz    = tar.xz
> -am.dist.ext.lzip  = tar.lz
> -am.dist.ext.zip   = zip
> +# TODO: this definition-oriented interface is almost god enough to offer

The job sure is nice, but not _that_ good :)

> +# as a public API allowing the user to define and use new archive formats.
> +# However, we must think carefully about possible problems before setting
> +# the API in stone.  So, for the moment, we keep this internal and
> +# private; there will be time to make it public, once (and if) there's
> +# any request from the user base.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]