aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-29 16:54:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-29 16:54:40 +0200
commitc5cece92dab1595fdc84c7b19a767218dae31acf (patch)
treea01f0dc474b2ba6ee5371bfd2975d0646ee363b0 /odb/sqlite
parent17e417d9c1ef48245bbb86386856524278c49128 (diff)
Add parallel version headers for build2
Diffstat (limited to 'odb/sqlite')
-rw-r--r--odb/sqlite/buildfile7
-rw-r--r--odb/sqlite/version-build2.hxx.in44
-rw-r--r--odb/sqlite/version.hxx5
3 files changed, 56 insertions, 0 deletions
diff --git a/odb/sqlite/buildfile b/odb/sqlite/buildfile
index 81f89bb..c2f99d4 100644
--- a/odb/sqlite/buildfile
+++ b/odb/sqlite/buildfile
@@ -41,6 +41,7 @@ lib{odb-sqlite}: \
{hxx ixx cxx}{ transaction } \
{hxx ixx cxx}{ transaction-impl } \
{hxx }{ version } \
+ {hxx }{ version-build2 } \
{hxx txx }{ view-result } \
{hxx txx }{ view-statements } \
details/{hxx }{ config } \
@@ -51,6 +52,9 @@ details/build2/{h }{ config } \
details/build2/{h }{ config-vc } \
$int_libs
+hxx{version-build2}: in{version-build2} $src_root/file{manifest}
+hxx{version-build2}: dist = true
+
# For pre-releases use the complete version to make sure they cannot be used
# in place of another pre-release or the final version.
#
@@ -97,6 +101,9 @@ install.include.subdirs = true # Recreate subdirectories.
# We want these to be picked up even when LIBODB_SQLITE_BUILD2 is not defined.
#
+hxx{version}@./: install = false
+hxx{version-build2}: install = $install.include/version.hxx
+
details/build2/:
{
if ($cxx.id == "msvc")
diff --git a/odb/sqlite/version-build2.hxx.in b/odb/sqlite/version-build2.hxx.in
new file mode 100644
index 0000000..9c48376
--- /dev/null
+++ b/odb/sqlite/version-build2.hxx.in
@@ -0,0 +1,44 @@
+// file : odb/sqlite/version-build2.hxx.in
+// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef LIBODB_SQLITE_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 LIBODB_SQLITE_VERSION $libodb-sqlite.version.project_number$ULL
+#define LIBODB_SQLITE_VERSION_STR "$libodb-sqlite.version.project$"
+#define LIBODB_SQLITE_VERSION_ID "$libodb-sqlite.version.project_id$"
+
+#define LIBODB_SQLITE_VERSION_MAJOR $libodb-sqlite.version.major$
+#define LIBODB_SQLITE_VERSION_MINOR $libodb-sqlite.version.minor$
+#define LIBODB_SQLITE_VERSION_PATCH $libodb-sqlite.version.patch$
+
+#define LIBODB_SQLITE_PRE_RELEASE $libodb-sqlite.version.pre_release$
+
+#define LIBODB_SQLITE_SNAPSHOT $libodb-sqlite.version.snapshot_sn$ULL
+#define LIBODB_SQLITE_SNAPSHOT_ID "$libodb-sqlite.version.snapshot_id$"
+
+#include <odb/version.hxx>
+
+$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$
+
+#endif // LIBODB_SQLITE_VERSION
diff --git a/odb/sqlite/version.hxx b/odb/sqlite/version.hxx
index 33ca611..4d9758f 100644
--- a/odb/sqlite/version.hxx
+++ b/odb/sqlite/version.hxx
@@ -2,6 +2,10 @@
// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
+#ifdef LIBODB_SQLITE_BUILD2
+# include <odb/sqlite/version-build2.hxx>
+#else
+
#ifndef ODB_SQLITE_VERSION_HXX
#define ODB_SQLITE_VERSION_HXX
@@ -41,3 +45,4 @@
#include <odb/post.hxx>
#endif // ODB_SQLITE_VERSION_HXX
+#endif // LIBODB_SQLITE_BUILD2