diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | odb/pgsql/buildfile | 7 | ||||
-rw-r--r-- | odb/pgsql/version-build2.hxx.in | 44 | ||||
-rw-r--r-- | odb/pgsql/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/pgsql/.gitignore. +# +odb/pgsql/version-build2.hxx diff --git a/odb/pgsql/buildfile b/odb/pgsql/buildfile index aea369d..4231233 100644 --- a/odb/pgsql/buildfile +++ b/odb/pgsql/buildfile @@ -37,6 +37,7 @@ lib{odb-pgsql}: \ {hxx }{ traits-calls } \ {hxx ixx cxx}{ transaction } \ {hxx ixx cxx}{ transaction-impl } \ + {hxx }{ version-build2 } \ {hxx }{ version } \ {hxx txx }{ view-result } \ {hxx txx }{ view-statements } \ @@ -49,6 +50,9 @@ details/build2/{h }{ config } \ details/build2/{h }{ config-vc } \ $imp_libs $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. # @@ -95,6 +99,9 @@ install.include.subdirs = true # Recreate subdirectories. # We want these to be picked up even when LIBODB_PGSQL_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/pgsql/version-build2.hxx.in b/odb/pgsql/version-build2.hxx.in new file mode 100644 index 0000000..0283c35 --- /dev/null +++ b/odb/pgsql/version-build2.hxx.in @@ -0,0 +1,44 @@ +// file : odb/pgsql/version-build2.hxx.in +// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef LIBODB_PGSQL_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_PGSQL_VERSION $libodb-pgsql.version.project_number$ULL +#define LIBODB_PGSQL_VERSION_STR "$libodb-pgsql.version.project$" +#define LIBODB_PGSQL_VERSION_ID "$libodb-pgsql.version.project_id$" + +#define LIBODB_PGSQL_VERSION_MAJOR $libodb-pgsql.version.major$ +#define LIBODB_PGSQL_VERSION_MINOR $libodb-pgsql.version.minor$ +#define LIBODB_PGSQL_VERSION_PATCH $libodb-pgsql.version.patch$ + +#define LIBODB_PGSQL_PRE_RELEASE $libodb-pgsql.version.pre_release$ + +#define LIBODB_PGSQL_SNAPSHOT $libodb-pgsql.version.snapshot_sn$ULL +#define LIBODB_PGSQL_SNAPSHOT_ID "$libodb-pgsql.version.snapshot_id$" + +#include <odb/version.hxx> + +$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$ + +#endif // LIBODB_PGSQL_VERSION diff --git a/odb/pgsql/version.hxx b/odb/pgsql/version.hxx index 983abb9..40c728a 100644 --- a/odb/pgsql/version.hxx +++ b/odb/pgsql/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_PGSQL_BUILD2 +# include <odb/pgsql/version-build2.hxx> +#else + #ifndef ODB_PGSQL_VERSION_HXX #define ODB_PGSQL_VERSION_HXX @@ -42,3 +46,4 @@ #include <odb/post.hxx> #endif // ODB_PGSQL_VERSION_HXX +#endif // LIBODB_PGSQL_BUILD2 |