summaryrefslogtreecommitdiffstats
path: root/build2/version/rule.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-29 22:41:17 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-30 12:05:53 +0300
commit9277075f1c42bbc7b1f4b1d7635c20f3a80ee565 (patch)
tree1e41253f4c50aad4a599b1acefd0872175b6625b /build2/version/rule.cxx
parentec14eabf9c2cb4630d384a256479b80e93f6a6d5 (diff)
downloadbuild2-9277075f1c42bbc7b1f4b1d7635c20f3a80ee565.tar.gz
build2-9277075f1c42bbc7b1f4b1d7635c20f3a80ee565.tar.xz
build2-9277075f1c42bbc7b1f4b1d7635c20f3a80ee565.zip
Add support for $ and shortcut operator in dependency constraint
Diffstat (limited to 'build2/version/rule.cxx')
-rw-r--r--build2/version/rule.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx
index b7b0b842..1ff5b41a 100644
--- a/build2/version/rule.cxx
+++ b/build2/version/rule.cxx
@@ -135,8 +135,6 @@ namespace build2
// of the MT-safety.
//
standard_version_constraint c;
-
- try
{
auto i (m.dependencies.find (pn));
@@ -146,12 +144,15 @@ namespace build2
if (i->second.empty ())
fail (l) << "no version constraint for dependency " << pn;
- c = standard_version_constraint (i->second);
- }
- catch (const invalid_argument& e)
- {
- fail (l) << "invalid version constraint for dependency " << pn
- << ": " << e;
+ try
+ {
+ c = standard_version_constraint (i->second, m.version);
+ }
+ catch (const invalid_argument& e)
+ {
+ fail (l) << "invalid version constraint for dependency " << pn
+ << " " << i->second << ": " << e;
+ }
}
// Now substitute.