aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-29 15:19:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-29 15:19:32 +0200
commitd577b075a8f193a45ebbbd268582c4b60258c91e (patch)
treec97f8a50423c4d46025c6466be25515297e3e11c /build2
parent027b99c35cf0e09fd758666232fd114d67e4346b (diff)
Add support for stub versions in version module
Diffstat (limited to 'build2')
-rw-r--r--build2/parser.cxx2
-rw-r--r--build2/version/init.cxx8
-rw-r--r--build2/version/rule.cxx2
3 files changed, 8 insertions, 4 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index d84ebfa..9dbce3b 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -1251,7 +1251,7 @@ namespace build2
if (!i->simple ())
fail (l) << "module version expected instead of " << *i;
- v = standard_version (i->value, true); // Allow earliest.
+ v = standard_version (i->value, standard_version::allow_earliest);
}
catch (const invalid_argument& e)
{
diff --git a/build2/version/init.cxx b/build2/version/init.cxx
index 3f8a42a..631d899 100644
--- a/build2/version/init.cxx
+++ b/build2/version/init.cxx
@@ -61,7 +61,11 @@ namespace build2
{
try
{
- v = standard_version (nv.value);
+ // Allow the package stub versions in the 0+<revision> form.
+ // While not standard, we want to use the version module for
+ // packaging stubs.
+ //
+ v = standard_version (nv.value, standard_version::allow_stub);
}
catch (const invalid_argument& e)
{
@@ -276,7 +280,7 @@ namespace build2
dist_callback (const path& f, const scope& rs, void* data)
{
module& m (*static_cast<module*> (data));
- const standard_version v (m.version);
+ const standard_version& v (m.version);
// Complain if this is an uncommitted snapshot.
//
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx
index 6632d55..3e143c1 100644
--- a/build2/version/rule.cxx
+++ b/build2/version/rule.cxx
@@ -474,7 +474,7 @@ namespace build2
if (verb >= 2)
text << "ver -o " << tp << ' ' << ip;
else if (verb)
- text << "ver " << tp;
+ text << "ver " << ip;
// Read and process the file, one line at a time.
//