[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Version defines in config.h
From: |
Stepan Kasal |
Subject: |
Re: Version defines in config.h |
Date: |
Fri, 8 Dec 2006 12:51:39 +0100 |
User-agent: |
Mutt/1.4.2.1i |
Hello,
On Fri, Dec 08, 2006 at 06:06:44AM +0100, Jerker Bäck wrote:
> Is there a way to get the following defines to be written to config.h during
> configure?
>
> #define FILEVERSION_MAJOR 1
[...]
yes, use
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([FILEVERSION_MAJOR], [1], [Major version of the file.])
...
> Have there been any rules or strategies about version numbers?
About the numbering, there are many diffreent strategies, I cannot
list them right now.
About the fact that the same version number should appear in AC_INIT
and in the config.h, here is an example:
m4_define([gnumeric_version_epoch], [1])
m4_define([gnumeric_version_major], [7])
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])
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([GNUMERIC_VERSION], ["gnumeric_full_version"],
[The version number of this release, possibly suffixed for bonobo])
AC_DEFINE([GNM_VERSION_EPOCH], [gnumeric_version_epoch],
[The Epoch of this release])
AC_DEFINE([GNM_VERSION_MAJOR], [gnumeric_version_major],
[The Major version number of this release])
AC_DEFINE([GNM_VERSION_MINOR], [gnumeric_version_minor],
[The Minor version number of this release])
AC_DEFINE([GNM_VERSION_EXTRA], ["gnumeric_version_extra"],
[Extra, possibly empty tag for this release])
Hope this helps,
Stepan Kasal