diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/.gitignore | 1 | ||||
-rw-r--r-- | cli/buildfile | 4 | ||||
-rw-r--r-- | cli/cli.cxx | 4 | ||||
-rw-r--r-- | cli/version.hxx.in | 45 |
4 files changed, 53 insertions, 1 deletions
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 |