From 9277075f1c42bbc7b1f4b1d7635c20f3a80ee565 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 29 Jan 2019 22:41:17 +0300 Subject: Add support for $ and shortcut operator in dependency constraint --- build2/version/rule.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'build2/version/rule.cxx') diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index b7b0b84..1ff5b41 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. -- cgit v1.1