From 578320514323ed9d2a58f48b9bdf9311b24bfbf4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 29 Apr 2017 09:41:31 +0200 Subject: Bump version to 1.2.0-b.0.z, switch to version module --- .gitignore | 4 ++++ build/bootstrap.build | 10 +--------- buildfile | 4 +++- cli/.gitignore | 1 + cli/buildfile | 4 ++++ cli/cli.cxx | 4 +++- cli/version.hxx.in | 45 +++++++++++++++++++++++++++++++++++++++++++++ manifest | 8 ++++---- version | 1 - 9 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 cli/version.hxx.in delete mode 100644 version 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 #include +#include + 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 +// 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 + +$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 -- cgit v1.1