From 7274320bab5de6cbc4a4c9e242574c02dc82d02b Mon Sep 17 00:00:00 2001 From: bernie Date: Tue, 31 Aug 2004 00:16:27 +0000 Subject: [PATCH] Add VERS_BUILD and VERS_HOST. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@182 38d2e660-2303-0410-9eaa-f027e97ec537 --- verstag.c | 26 ++++++++++++++++++++++++++ verstag.h | 17 +++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100755 verstag.c diff --git a/verstag.c b/verstag.c new file mode 100755 index 00000000..0605bdfb --- /dev/null +++ b/verstag.c @@ -0,0 +1,26 @@ +/*! + * \file + * + * + * \version $Id$ + * + * \author Bernardo Innocenti + * + * \brief Define application version strings + */ +#include "verstag.h" + +/* + * "buildrev.h" is auto-generated by the build infrastructure, + * incrementing VERS_BUILD each time the project is rebuilt. + */ +#include "buildrev.h" + +const char vers_tag[] = VERS_TAG; +const int vers_build_nr = VERS_BUILD; +const char vers_build_str[] = _STRINGIZE(VERS_BUILD); +const char vers_host[] = VERS_HOST; + diff --git a/verstag.h b/verstag.h index 7ebe2c87..f99789d3 100755 --- a/verstag.h +++ b/verstag.h @@ -10,7 +10,7 @@ * * \author Bernardo Innocenti * - * \brief Define version strings + * \brief Declare application version strings */ #ifndef DEVLIB_VERSTAG_H #define DEVLIB_VERSTAG_H @@ -50,7 +50,9 @@ #define VERS_DBG "" #endif -#define _STRINGIZE(a) #a +#define __STRINGIZE(x) #x +#define _STRINGIZE(x) __STRINGIZE(x) + /*! Build application version string (i.e.: "1.7.0") */ #define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG #ifdef _SNAPSHOT @@ -59,8 +61,19 @@ #define VERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV) #endif + /*! Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */ #define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld) #define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV) +/*! The revision string (contains VERS_TAG) */ +extern const char vers_tag[]; + +/*! Sequential build number (contains VERS_BUILD) */ +extern const int vers_build_nr; +//extern const char vers_build_str[]; + +/*! Hostname of the machine used to build this binary (contains VERS_HOST) */ +extern const char vers_host[]; + #endif /* DEVLIB_VERSTAG_H */ -- 2.25.1