autoconf
[Top][All Lists]
Advanced

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

Re: AC_INIT receiving PACKAGE_VERSION from outside


From: Sam Steingold
Subject: Re: AC_INIT receiving PACKAGE_VERSION from outside
Date: Thu, 17 Mar 2005 18:23:48 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

> * Alexandre Duret-Lutz <address@hidden> [2005-03-17 23:52:14 +0100]:
>
> [...]
>  Stepan> In your case, you would put the defines in a separate
>  Stepan> file, and include it like this
>  Stepan> 
>  Stepan> m4_include([m4/version.m4])
>  Stepan> AC_INIT([gnumeric], [gnumeric_full_version],
>  Stepan> [http://bugzilla.gnome.org/enter_bug.cgi?product=gnumeric])
>
>  Bruno> This would work, but now I need 'm4' or 'autoconf --trace' to retrieve
>  Bruno> the version number from version.m4. Which is not an improvement over
>  Bruno> 'grep'. 
>
> AC_INIT([foobar], m4_normalize(m4_include([version])))
>
> And write down your version string in the `version' file.

what if my version is more complex?
e.g.
--------------------------------------------------------------
# Version number and release date.
VERSION_NUMBER=2.33.83
RELEASE_DATE=2005-03-14      # in "date +%Y-%m-%d" format
--------------------------------------------------------------
do I need something like this:

syscmd([. version.sh; echo "${VERSION_NUMBER} ${RELEASE_DATE}">version])
AC_INIT([foobar], m4_normalize(m4_include([version])))
syscmd([rm -f version])

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.honestreporting.com> <http://www.camera.org>
<http://www.memri.org/> <http://www.openvotingconsortium.org/>
Those who can't write, write manuals.




reply via email to

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