summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-29 09:41:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-29 09:45:54 +0200
commit578320514323ed9d2a58f48b9bdf9311b24bfbf4 (patch)
tree6b4ea6d134f18a8bbb0cefd64a5cd8617a1ef4af
parent0c7d4156a13942e259e99bae570d536b37af8aad (diff)
downloadcli-578320514323ed9d2a58f48b9bdf9311b24bfbf4.tar.gz
cli-578320514323ed9d2a58f48b9bdf9311b24bfbf4.tar.xz
cli-578320514323ed9d2a58f48b9bdf9311b24bfbf4.zip
Bump version to 1.2.0-b.0.z, switch to version module
-rw-r--r--.gitignore4
-rw-r--r--build/bootstrap.build10
-rw-r--r--buildfile4
-rw-r--r--cli/.gitignore1
-rw-r--r--cli/buildfile4
-rw-r--r--cli/cli.cxx4
-rw-r--r--cli/version.hxx.in45
-rw-r--r--manifest8
-rw-r--r--version1
9 files changed, 65 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 01994ef..784f613 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,7 @@
*.exe
*.exe.dlls/
*.exe.manifest
+
+# Generated version.
+#
+version
diff --git a/build/bootstrap.build b/build/bootstrap.build
index 30a97a1..43ca038 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -4,15 +4,7 @@
project = cli
-using build@0.4.0
-
-version = 1.2.0-a2
-revision = 0
-
-dist.package = $project-$version
-
-if ($revision != 0)
- dist.package += +$revision
+using version
# By default leave the cli module unconfigured since we don't want to use some
# system-installed cli. Note that this value will be overridden if set both on
diff --git a/buildfile b/buildfile
index 1e8c9e3..f373af4 100644
--- a/buildfile
+++ b/buildfile
@@ -18,7 +18,9 @@ if $cli.configured
d += tests/ examples/
./: $d doc{INSTALL LICENSE NEWS README version} file{manifest}
-include $d
+
+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/cli/.gitignore b/cli/.gitignore
index 573c0c4..bb4f521 100644
--- a/cli/.gitignore
+++ b/cli/.gitignore
@@ -1 +1,2 @@
cli
+version.hxx
diff --git a/cli/buildfile b/cli/buildfile
index 9ddc880..248dcc6 100644
--- a/cli/buildfile
+++ b/cli/buildfile
@@ -25,6 +25,7 @@ exe{cli}: \
{hxx ixx }{ token } \
{hxx }{ traversal } \
{hxx cxx}{ txt } \
+ {hxx }{ version } \
semantics/{hxx cxx}{ class } \
semantics/{hxx cxx}{ doc } \
semantics/{hxx cxx}{ elements } \
@@ -41,6 +42,9 @@ traversal/{hxx cxx}{ option } \
traversal/{hxx cxx}{ unit } \
$libs
+hxx{version}: in{version} $src_root/file{manifest}
+hxx{version}: dist = true
+
# Generated options parser.
#
if $cli.configured
diff --git a/cli/cli.cxx b/cli/cli.cxx
index b22d164..6465a51 100644
--- a/cli/cli.cxx
+++ b/cli/cli.cxx
@@ -17,6 +17,8 @@
#include <cli/parser.hxx>
#include <cli/generator.hxx>
+#include <cli/version.hxx>
+
using namespace std;
using namespace cutl;
@@ -37,7 +39,7 @@ main (int argc, char* argv[])
{
ostream& o (cout);
- o << "CodeSynthesis CLI command line interface compiler 1.2.0-a2" << endl
+ o << "CLI (command line interface compiler) " << CLI_VERSION_ID << endl
<< "Copyright (c) 2009-2017 Code Synthesis Tools CC" << endl;
o << "This is free software; see the source for copying conditions. "
diff --git a/cli/version.hxx.in b/cli/version.hxx.in
new file mode 100644
index 0000000..5e0091e
--- /dev/null
+++ b/cli/version.hxx.in
@@ -0,0 +1,45 @@
+// file : cli/version.hxx.in
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC
+// license : MIT; see accompanying LICENSE file
+
+#ifndef CLI_VERSION // Note: using the version macro itself.
+
+// Note: using cli 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 CLI_VERSION $cli.version.project_number$ULL
+#define CLI_VERSION_STR "$cli.version.project$"
+#define CLI_VERSION_ID "$cli.version.project_id$"
+
+#define CLI_VERSION_MAJOR $cli.version.major$
+#define CLI_VERSION_MINOR $cli.version.minor$
+#define CLI_VERSION_PATCH $cli.version.patch$
+
+#define CLI_PRE_RELEASE $cli.version.pre_release$
+
+#define CLI_SNAPSHOT $cli.version.snapshot_sn$ULL
+#define CLI_SNAPSHOT_ID "$cli.version.snapshot_id$"
+
+#include <cutl/version.hxx>
+
+$libcutl.check(LIBCUTL_VERSION, LIBCUTL_SNAPSHOT)$
+
+#endif // CLI_VERSION
diff --git a/manifest b/manifest
index f660a81..9c3f8bd 100644
--- a/manifest
+++ b/manifest
@@ -1,6 +1,6 @@
: 1
name: cli
-version: 1.2.0-a2
+version: 1.2.0-b.0.z
summary: Command line interface compiler
license: MIT
tags: command, line, cli, compiler, option, argument, parse, usage, help
@@ -10,6 +10,6 @@ url: http://www.codesynthesis.com/projects/cli/
email: cli-users@codesynthesis.com; Mailing list
build-email: builds@codesynthesis.com
requires: c++14
-depends: * build2 >= 0.4.0
-depends: * bpkg >= 0.4.0
-depends: libcutl == 1.11.0-a1
+depends: * build2 >= 0.5.0-
+depends: * bpkg >= 0.5.0-
+depends: libcutl > 1.11.0-b.1
diff --git a/version b/version
deleted file mode 100644
index 8d2f1bc..0000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-1.2.0-a2