aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-26 11:36:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-28 11:11:12 +0200
commitd788910fc30b78b375fc406a17e0e0c62cb1aa1b (patch)
tree90b426e3210171c373159eadcb3ebfdc33665a21
parent112a4857e26c7116256ce745d9b7c4d17e78edd8 (diff)
Update to use version module
-rw-r--r--.gitignore4
-rw-r--r--build/bootstrap.build17
-rw-r--r--buildfile8
-rw-r--r--manifest6
-rw-r--r--version1
-rw-r--r--xml/buildfile9
-rw-r--r--xml/version27
-rw-r--r--xml/version.in41
8 files changed, 60 insertions, 53 deletions
diff --git a/.gitignore b/.gitignore
index 6473b20..57a1d36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,7 @@
# Generated .gitignore files.
#
.gitignore
+
+# Generated version.
+#
+version
diff --git a/build/bootstrap.build b/build/bootstrap.build
index 6c4e732..c0c470b 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -4,22 +4,7 @@
project = libstudxml
-using build@0.4.0
-
-version = 1.1.0-a5
-
-abi_major = 1
-abi_minor = 1
-abi_patch = 0
-abi_prerelease = true
-
-revision = 0
-
-dist.package = $project-$version
-
-if ($revision != 0)
- dist.package += +$revision
-
+using version
using config
using dist
using test
diff --git a/buildfile b/buildfile
index 208b1e7..c0df1b9 100644
--- a/buildfile
+++ b/buildfile
@@ -2,9 +2,11 @@
# copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
-d = xml/ examples/ tests/ doc/
-./: $d doc{INSTALL LICENSE NEWS README version} file{manifest}
-include $d
+./: xml/ examples/ tests/ doc/ doc{INSTALL LICENSE NEWS README version} \
+ file{manifest}
+
+doc{version}: file{manifest} # Generated by the version module.
+doc{version}: dist = true
# Don't install examples, tests or the INSTALL file.
#
diff --git a/manifest b/manifest
index c255a9f..1d0da7f 100644
--- a/manifest
+++ b/manifest
@@ -1,6 +1,6 @@
: 1
name: libstudxml
-version: 1.1.0-a5
+version: 1.1.0-b.0.z
summary: Streaming XML pull parser/serializer for modern C++
license: MIT
tags: c++, xml, parser, serializer, streaming, pull, conforming
@@ -10,5 +10,5 @@ url: http://www.codesynthesis.com/projects/libstudxml/
email: studxml-users@codesynthesis.com; Mailing list
build-email: builds@codesynthesis.com
requires: c++11
-depends: * build2 >= 0.4.0
-depends: * bpkg >= 0.4.0
+depends: * build2 >= 0.5.0-
+depends: * bpkg >= 0.5.0-
diff --git a/version b/version
deleted file mode 100644
index 4b4561a..0000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-1.1.0-a5
diff --git a/xml/buildfile b/xml/buildfile
index fd16316..6ce4568 100644
--- a/xml/buildfile
+++ b/xml/buildfile
@@ -43,16 +43,19 @@ details/genx/c{ genx } \
details/genx/h{ genx } \
details/genx/doc{LICENSE README}
+hxx{version}: in{version} $src_root/file{manifest}
+hxx{version}: dist = true
+
details/genx/doc{README}@./: install = false
details/genx/doc{LICENSE}@./: install = doc/GENX-LICENSE
# For pre-releases use the complete version to make sure they cannot be used
# in place of another pre-release or the final version.
#
-if $abi_prerelease
- lib{studxml}: bin.lib.version = @-$version
+if $version.pre_release
+ lib{studxml}: bin.lib.version = @"-$version.project_id"
else
- lib{studxml}: bin.lib.version = @-$abi_major.$abi_minor
+ lib{studxml}: bin.lib.version = @"-$version.major.$version.minor"
# We are a mixed C/C++ library, though C is implementatio-only, kind of: we
# need headers but not symbols.
diff --git a/xml/version b/xml/version
deleted file mode 100644
index fe56253..0000000
--- a/xml/version
+++ /dev/null
@@ -1,27 +0,0 @@
-// file : xml/version -*- C++ -*-
-// copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
-// license : MIT; see accompanying LICENSE file
-
-#ifndef LIBSTUDXML_VERSION // Note: using the version macro itself.
-
-// Version format is AABBCCDD where
-//
-// AA - major version number
-// BB - minor version number
-// CC - bugfix version number
-// DD - alpha / beta (DD + 50) version number
-//
-// When DD is not 00, 1 is subtracted from AABBCC. For example:
-//
-// Version AABBCCDD
-// 2.0.0 02000000
-// 2.1.0 02010000
-// 2.1.1 02010100
-// 2.2.0-a1 02019901
-// 3.0.0-b2 02999952
-//
-
-#define LIBSTUDXML_VERSION 1009905
-#define LIBSTUDXML_VERSION_STR "1.1.0-a5"
-
-#endif // LIBSTUDXML_VERSION
diff --git a/xml/version.in b/xml/version.in
new file mode 100644
index 0000000..1520b52
--- /dev/null
+++ b/xml/version.in
@@ -0,0 +1,41 @@
+// file : xml/version -*- C++ -*-
+// copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
+// license : MIT; see accompanying LICENSE file
+
+#ifndef LIBSTUDXML_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 LIBSTUDXML_VERSION $libstudxml.version.project_number$ULL
+#define LIBSTUDXML_VERSION_STR "$libstudxml.version.project$"
+#define LIBSTUDXML_VERSION_ID "$libstudxml.version.project_id$"
+
+#define LIBSTUDXML_VERSION_MAJOR $libstudxml.version.major$
+#define LIBSTUDXML_VERSION_MINOR $libstudxml.version.minor$
+#define LIBSTUDXML_VERSION_PATCH $libstudxml.version.patch$
+
+#define LIBSTUDXML_PRE_RELEASE $libstudxml.version.pre_release$
+
+#define LIBSTUDXML_SNAPSHOT $libstudxml.version.snapshot_sn$ULL
+#define LIBSTUDXML_SNAPSHOT_ID "$libstudxml.version.snapshot_id$"
+
+#endif // LIBSTUDXML_VERSION