aboutsummaryrefslogtreecommitdiff
path: root/bbot/version.hxx.in
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:21:12 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:26:21 +0300
commit0ffb0a1a0a13d07c4448f7752232d8854b790623 (patch)
tree9d1e173375d53e05c52568dc69633ed98697190d /bbot/version.hxx.in
parent1364413cee696ff60f4dd1e3ac1eb281ac7a4e8f (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'bbot/version.hxx.in')
-rw-r--r--bbot/version.hxx.in87
1 files changed, 87 insertions, 0 deletions
diff --git a/bbot/version.hxx.in b/bbot/version.hxx.in
new file mode 100644
index 0000000..9f451e8
--- /dev/null
+++ b/bbot/version.hxx.in
@@ -0,0 +1,87 @@
+// file : bbot/version.hxx.in -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : TBC; see accompanying LICENSE file
+
+#ifndef BBOT_VERSION // Note: using the version macro itself.
+
+// Note: using build2 standard versioning scheme. The numeric version format
+// is AAABBBCCCDDDE where:
+//
+// AAA - major version number
+// BBB - minor version number
+// CCC - bugfix version number
+// DDD - alpha / beta (DDD + 500) version number
+// E - final (0) / snapshot (1)
+//
+// When DDDE is not 0, 1 is subtracted from AAABBBCCC. For example:
+//
+// Version AAABBBCCCDDDE
+//
+// 0.1.0 0000010000000
+// 0.1.2 0000010010000
+// 1.2.3 0010020030000
+// 2.2.0-a.1 0020019990010
+// 3.0.0-b.2 0029999995020
+// 2.2.0-a.1.z 0020019990011
+//
+#define BBOT_VERSION $bbot.version.project_number$ULL
+#define BBOT_VERSION_STR "$bbot.version.project$"
+#define BBOT_VERSION_ID "$bbot.version.project_id$"
+
+#define BBOT_VERSION_MAJOR $bbot.version.major$
+#define BBOT_VERSION_MINOR $bbot.version.minor$
+#define BBOT_VERSION_PATCH $bbot.version.patch$
+
+#define BBOT_PRE_RELEASE $bbot.version.pre_release$
+
+#define BBOT_SNAPSHOT $bbot.version.snapshot_sn$ULL
+#define BBOT_SNAPSHOT_ID "$bbot.version.snapshot_id$"
+
+#include <butl/version>
+
+$libbutl.check(LIBBUTL_VERSION, LIBBUTL_SNAPSHOT)$
+
+#include <libbbot/version.hxx>
+
+$libbbot.check(LIBBBOT_VERSION, LIBBBOT_SNAPSHOT)$
+
+// User agent.
+//
+#if defined(_WIN32)
+# if defined(__MINGW32__)
+# define BBOT_OS "MinGW"
+# else
+# define BBOT_OS "Windows"
+# endif
+#elif defined(__linux)
+# define BBOT_OS "GNU/Linux"
+#elif defined(__APPLE__)
+# define BBOT_OS "MacOS"
+#elif defined(__CYGWIN__)
+# define BBOT_OS "Cygwin"
+#elif defined(__FreeBSD__)
+# define BBOT_OS "FreeBSD"
+#elif defined(__OpenBSD__)
+# define BBOT_OS "OpenBSD"
+#elif defined(__NetBSD__)
+# define BBOT_OS "NetBSD"
+#elif defined(__sun)
+# define BBOT_OS "Solaris"
+#elif defined(__hpux)
+# define BBOT_OS "HP-UX"
+#elif defined(_AIX)
+# define BBOT_OS "AIX"
+#elif defined(__unix)
+# define BBOT_OS "Unix"
+#elif defined(__posix)
+# define BBOT_OS "Posix"
+#else
+# define BBOT_OS "Other"
+#endif
+
+#define BBOT_USER_AGENT \
+ "bbot/" BBOT_VERSION_STR " (" BBOT_OS "; +https://build2.org)" \
+ " libbbot/" LIBBBOT_VERSION_STR \
+ " libbutl/" LIBBUTL_VERSION_STR
+
+#endif // BBOT_VERSION