aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/bash
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-10-15 14:20:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-10-15 14:20:44 +0200
commit921c2d503a63f4769fdf1c7e6eb31be2706f9bea (patch)
tree487698c7e2877dec1eed4945cd2d1e9e09b7eb66 /libbuild2/bash
parent291a737de8f92a7f620853133aa404b98e552a21 (diff)
Add ability to specify fallback value for NULL substitutions with in.null
Diffstat (limited to 'libbuild2/bash')
-rw-r--r--libbuild2/bash/rule.cxx5
-rw-r--r--libbuild2/bash/rule.hxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/libbuild2/bash/rule.cxx b/libbuild2/bash/rule.cxx
index 148da95..9fc89d7 100644
--- a/libbuild2/bash/rule.cxx
+++ b/libbuild2/bash/rule.cxx
@@ -195,11 +195,12 @@ namespace build2
action a,
const target& t,
const string& n,
- bool strict) const
+ bool strict,
+ const optional<string>& null) const
{
return n.compare (0, 6, "import") == 0 && (n[6] == ' ' || n[6] == '\t')
? substitute_import (l, a, t, trim (string (n, 7)))
- : rule::substitute (l, a, t, n, strict);
+ : rule::substitute (l, a, t, n, strict, null);
}
string in_rule::
diff --git a/libbuild2/bash/rule.hxx b/libbuild2/bash/rule.hxx
index 0774b5f..81c4604 100644
--- a/libbuild2/bash/rule.hxx
+++ b/libbuild2/bash/rule.hxx
@@ -51,7 +51,8 @@ namespace build2
action a,
const target&,
const string&,
- bool) const override;
+ bool,
+ const optional<string>&) const override;
string
substitute_import (const location&,