From 921c2d503a63f4769fdf1c7e6eb31be2706f9bea Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Oct 2020 14:20:44 +0200 Subject: Add ability to specify fallback value for NULL substitutions with in.null --- libbuild2/bash/rule.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libbuild2/bash/rule.cxx') 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& 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:: -- cgit v1.1