[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_INIT receiving PACKAGE_VERSION from outside
From: |
Stepan Kasal |
Subject: |
Re: AC_INIT receiving PACKAGE_VERSION from outside |
Date: |
Fri, 11 Mar 2005 09:48:42 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Thu, Mar 10, 2005 at 01:13:47PM -0500, Sam Steingold wrote:
> Is there a way to keep the package version outside of
> configure.ac:AC_INIT?
...
> . ./version.sh
> AC_INIT(my package, ${myversion})
this solution doesn't work, as AC_INIT expects that it's arguments are
known when m4 runs (ie. when configure is created).
gnumeric uses the following solution:
m4_define([gnumeric_version_epoch], [1])
m4_define([gnumeric_version_major], [5])
m4_define([gnumeric_version_minor], [1])
m4_define([gnumeric_version_extra], [])
m4_define([gnumeric_full_version],
[gnumeric_version_epoch.gnumeric_version_major.gnumeric_version_minor[]gnumeric_version_extra])
AC_INIT([gnumeric], [gnumeric_full_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnumeric])
Of course, this can be simplified:
m4_define([gnumeric_full_version], 1.5.1)
AC_INIT([gnumeric], [gnumeric_full_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnumeric])
In your case, you would put the defines in a separate file, and include it
like this
m4_include([m4/version.m4])
AC_INIT([gnumeric], [gnumeric_full_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnumeric])
OTOH, I'm not sure why you need this.
According to my experience, it's easy to set the source so that configure.ac
is the only place where the version number is present.
Enjoy,
Stepan Kasal
- AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/10
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Eric Hanchrow, 2005/03/10
- Re: AC_INIT receiving PACKAGE_VERSION from outside,
Stepan Kasal <=
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Message not available
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruno Haible, 2005/03/11
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Bruce Korb, 2005/03/12
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Alexandre Duret-Lutz, 2005/03/17
- Re: AC_INIT receiving PACKAGE_VERSION from outside, Sam Steingold, 2005/03/18