diff options
-rw-r--r-- | build2/parser.cxx | 2 | ||||
-rw-r--r-- | build2/version/init.cxx | 8 | ||||
-rw-r--r-- | build2/version/rule.cxx | 2 |
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. // |