Fix a bug in the (unused) RTS/CTS code; Clarify documentation.
[bertos.git] / verstag.h
index d9a1d1768ef4ffbb0b0250104248d7f81c39a943..7ebe2c8718bd0d8b5303cddd70b2fc46aeda8278 100755 (executable)
--- a/verstag.h
+++ b/verstag.h
@@ -1,8 +1,8 @@
 /*!
  * \file
  * <!--
- * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2001,2002,2003 by Bernardo Innocenti <bernie@codewiz.org>
+ * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2001, 2002, 2003 by Bernardo Innocenti <bernie@codewiz.org>
  * This file is part of DevLib - See devlib/README for information.
  * -->
  *
@@ -12,8 +12,8 @@
  *
  * \brief Define version strings
  */
-#ifndef VERSTAG_H
-#define VERSTAG_H
+#ifndef DEVLIB_VERSTAG_H
+#define DEVLIB_VERSTAG_H
 
 #ifndef ARCH_CONFIG_H
        #include "arch_config.h"
        #error unknown architecture
 #endif
 
+/*!
+ * If _SNAPSHOT is defined, VERSION_TAG build the version using the compilation
+ * date instead of building the numeric version string.
+ */
+#define _SNAPSHOT
+
 #ifdef _DEBUG
        #define VERS_DBG "D"
 #else
 #define _STRINGIZE(a) #a
 /*! 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 VERSION_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
+#else
+       #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)
 
-#endif /* VERSTAG_H */
+#endif /* DEVLIB_VERSTAG_H */