diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | odb/sqlite/buildfile | 7 | ||||
-rw-r--r-- | odb/sqlite/version-build2.hxx.in | 44 | ||||
-rw-r--r-- | odb/sqlite/version.hxx | 5 |
4 files changed, 60 insertions, 0 deletions
@@ -27,3 +27,7 @@ # Generated .gitignore files. # .gitignore + +# Temporarily here because of auto-generated odb/sqlite/.gitignore. +# +odb/sqlite/version-build2.hxx 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 |