aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-buildscript.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-31 12:37:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-06-08 15:43:08 +0200
commitc5feaaf745421f2ecda672585c462cf4c807d25d (patch)
treeda5b002dbd03fd624462cacfebb469df63708e63 /libbuild2/adhoc-rule-buildscript.cxx
parent274d65d2a76ed48cb618e25e0916e20ba3d5c87b (diff)
Only pass target to recipe_text() if recipe is not shared
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.cxx')
-rw-r--r--libbuild2/adhoc-rule-buildscript.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx
index 73219b6..fe74fc6 100644
--- a/libbuild2/adhoc-rule-buildscript.cxx
+++ b/libbuild2/adhoc-rule-buildscript.cxx
@@ -23,8 +23,12 @@ using namespace std;
namespace build2
{
bool adhoc_buildscript_rule::
- recipe_text (context& ctx, const target& tg, const adhoc_actions& acts,
- string&& t, attributes& as)
+ recipe_text (context& ctx,
+ const scope& s,
+ const target* tg,
+ const adhoc_actions& acts,
+ string&& t,
+ attributes& as)
{
// Handle and erase recipe-specific attributes.
//
@@ -57,7 +61,7 @@ namespace build2
istringstream is (move (t));
build::script::parser p (ctx);
- script = p.pre_parse (tg, acts,
+ script = p.pre_parse (s, tg, acts,
is, loc.file, loc.line + 1,
move (diag), as.loc);