Rename README to README.devlib.
[bertos.git] / verstag.h
index 0510b85858cf286bb665cf7f24bc6a1a686912f5..dc39124e467c96b1daa1a4ca2ea2a5d77e3b79d3 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
@@ -22,7 +22,7 @@
 #define APP_NAME "Appname"
 #define APP_DESCRIPTION "Long application name description"
 #define APP_AUTHOR "Develer"
-#define APP_COPYRIGHT "Copyright (C) 2004 by Develer (http://www.develer.com/)"
+#define APP_COPYRIGHT "Copyright 2004 Develer (http://www.develer.com/)"
 
 #if (ARCH & ARCH_FOO)
        #define VERS_MAJOR 0
        #error unknown architecture
 #endif
 
+/*!
+ * If _SNAPSHOT is defined, \c VERS_TAG contains the build date
+ * date instead of a numeric version string.
+ */
+#define _SNAPSHOT
+
 #ifdef _DEBUG
        #define VERS_DBG "D"
 #else
        #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
-#define VERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
+#ifdef _SNAPSHOT
+       #define VERS_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
+#else
+       #define VERS_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 */