[PATCH] autogenerate include/version.h ...
Stefan (metze) Metzmacher
metze at metzemix.de
Mon Aug 11 11:58:32 GMT 2003
At 07:11 11.08.2003 -0400, Ken Cross wrote:
>metze:
>
>Maybe I'm all alone in this, but...
>
>If I understand it, the only way to modify the version in your new scheme is
>to manually modify the VERSION file. I currently use cvs to automatically
>update my version numbers (very handy). I currently use:
>
> #define VERSION build_version_string()
>
>where build_version_string() is a simple function I wrote to extract the
>version from a cvs string like:
>
> #define CVS_REVISION "$Revision: 1.21 $"
>
>The function just extracts "1.21" from the string and adds it to the
>version:
>
> smbd -V
> Version 3.0.0rc1-1.21
where are you getting the 3.0.0rc1 from then?
>Will --with-samba-version='build_version_string()' work?
the --with-samba-version ...switch is only for detecting the version of old
samba tree's. and has nothing to do with the problem above.
>If not, is there a way to let the VENDOR_SUFFIX be a function (as opposed to
>a static #define)?
will something like that be ok for you:
you can set in source/VERSION
SAMBA_VERSION_VENDOR_SUFFIX="-MYSUFFIX"
or
SAMBA_VERSION_VENDOR_SUFFIX=my_vendor_suffix()
#define SAMBA_VERSION_MAJOR 3
#define SAMBA_VERSION_MINOR 0
#define SAMBA_VERSION_RELEASE 0
#define SAMBA_VERSION_RC_RELEASE 1
#define SAMBA_VERSION_IS_CVS_SNAPSHOT 1
#define SAMBA_VERSION_OFFICIAL_STRING "3.0.0rc1cvs"
#define SAMBA_VERSION_VENDOR_SUFFIX my_vendor_suffix()
#define SAMBA_VERSION_STRING samba_version_string()
...
const char *samba_version_string(void)
{
#ifdef SAMBA_VERSION_VENDOR_SUFFIX
static fstring samba_version;
static BOOL init_samba_version;
if (init_samba_version)
return samba_version;
fstr_printf("%s-%s",
SAMBA_VERSION_OFFICIAL_STRING,
SAMBA_VERSION_VENDOR_SUFFIX);
init_samba_version = True;
return samba_version;
#else
return SAMBA_VERSION_OFFICIAL_STRING;
#endif
}
metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>
More information about the samba-technical
mailing list