Add VERS_BUILD and VERS_HOST.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 31 Aug 2004 00:16:27 +0000 (00:16 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 31 Aug 2004 00:16:27 +0000 (00:16 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@182 38d2e660-2303-0410-9eaa-f027e97ec537

verstag.c [new file with mode: 0755]
verstag.h

diff --git a/verstag.c b/verstag.c
new file mode 100755 (executable)
index 0000000..0605bdf
--- /dev/null
+++ b/verstag.c
@@ -0,0 +1,26 @@
+/*!
+ * \file
+ * <!--
+ * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
+ * This file is part of DevLib - See devlib/README for information.
+ * -->
+ *
+ * \version $Id$
+ *
+ * \author Bernardo Innocenti <bernie@develer.com>
+ *
+ * \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;
+
index 7ebe2c8718bd0d8b5303cddd70b2fc46aeda8278..f99789d3388b93721a3c85d67300db962cb8375e 100755 (executable)
--- a/verstag.h
+++ b/verstag.h
@@ -10,7 +10,7 @@
  *
  * \author Bernardo Innocenti <bernie@develer.com>
  *
- * \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
        #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 */