From 8ecc09653d70fe8df4fc9fcd7214ba85e6db9c9c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 2 Sep 2022 10:29:15 +0200 Subject: Add ability to specify `in` rule substitution as key-value pairs --- libbuild2/bash/rule.cxx | 3 ++- libbuild2/bash/rule.hxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'libbuild2/bash') diff --git a/libbuild2/bash/rule.cxx b/libbuild2/bash/rule.cxx index 2abddc3..6e287e0 100644 --- a/libbuild2/bash/rule.cxx +++ b/libbuild2/bash/rule.cxx @@ -214,13 +214,14 @@ namespace build2 const string& n, optional flags, bool strict, + const substitution_map* smap, const optional& null) const { assert (!flags); 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, nullopt, strict, null); + : rule::substitute (l, a, t, n, nullopt, strict, smap, null); } string in_rule:: diff --git a/libbuild2/bash/rule.hxx b/libbuild2/bash/rule.hxx index f7ce5cd..5bd7fa7 100644 --- a/libbuild2/bash/rule.hxx +++ b/libbuild2/bash/rule.hxx @@ -52,6 +52,7 @@ namespace build2 const string&, optional, bool, + const substitution_map*, const optional&) const override; string -- cgit v1.1