automake
[Top][All Lists]
Advanced

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

Re: Autoconf caches AC_INIT arguments


From: Roger Leigh
Subject: Re: Autoconf caches AC_INIT arguments
Date: Wed, 23 May 2012 15:46:24 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 23, 2012 at 04:14:00PM +0200, Stefano Lattarini wrote:
> Hi Bob.
> 
> On 05/23/2012 02:17 AM, Bob Friesenhahn wrote:
> > The forthcoming Automake release is about to break the means I have been
> > using to automatically version my package (without manually editing
> > configure.ac) for the past 9 years.
> >
> I smell a misunderstanding here: Automake 1.12.1 will only start *warning*
> about such an usage, but will still work with it (there are checks in the
> Automake test suite that should verify this is indeed the case).  The actual
> removal of support for that usage will only take place in Automake 1.13, which
> I don't see appearing if not several several months from now (i.e,, until
> there is some major feature or non trivial bug-fix that justifies a new major
> release).
> 
> I will try to answer the rest of your message by today (or tomorrow).

I'm currently using the following scheme in a number of projects (in
this case, taken from schroot):

(Includes some compatibility hacks for earlier autotools versions.)

dnl m4 magic from Eric Blake <address@hidden>, prior to automake inclusion
m4_define([sbuild_m4_chomp],
[m4_format([[%.*s]], m4_bregexp(m4_translit([$1], [
]]m4_dquote(_m4_defn([m4_cr_all]))[, [/]]m4_format([%255s], [])[),
  [/*$]), [$1])])
m4_define([sbuild_m4_esyscmd_s],
[sbuild_m4_chomp(m4_esyscmd([$1]))])
AC_PREREQ(2.59)
dnl Quoting the first argument results in a bizarrely corrupted package tarname
AC_INIT(sbuild_m4_esyscmd_s([sed -ne 
'/^Package:/{s/Package:[[:space:]][[:space:]]*//p;q}' VERSION]),
        [sbuild_m4_esyscmd_s([sed -ne 
'/^Version:/{s/Version:[[:space:]][[:space:]]*//p;q}' VERSION])],
        address@hidden)

In the above, the VERSION file is generated from NEWS and git to
contain metadata about the release, including the package, version,
person releasing the package, release date etc.  This is done by
the bootstrap script, which runs autoreconf afterward.

Essentially, I have no desire to hardcode any of the release
metadata such as the version into configure.ac.  The above is my
own custom hack to generate and incorporate the metadata, but I
would happily adopt a more standard and generic solution if
possible.

What is the recommended way to use autoconf/automake in this type
of scenario?


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



reply via email to

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