aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-regex-pattern.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-01-16 08:07:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-01-16 08:11:03 +0200
commit3925bdc7708abd4387a5ffb0db60bc57098f2669 (patch)
tree4357758974e7768308f155c4d30f9ae23e0345b2 /libbuild2/adhoc-rule-regex-pattern.cxx
parent56cc47e7e5dd3aa15e1023db5525bdc6a5486c1f (diff)
Add add_adhoc_member_identity(), use to fix ad hoc pattern rule logic
Diffstat (limited to 'libbuild2/adhoc-rule-regex-pattern.cxx')
-rw-r--r--libbuild2/adhoc-rule-regex-pattern.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbuild2/adhoc-rule-regex-pattern.cxx b/libbuild2/adhoc-rule-regex-pattern.cxx
index cd8c241..9101000 100644
--- a/libbuild2/adhoc-rule-regex-pattern.cxx
+++ b/libbuild2/adhoc-rule-regex-pattern.cxx
@@ -366,7 +366,9 @@ namespace build2
// @@ TODO: save location in constructor?
//
- optional<string> ext (target::split_name (n, location ()));
+ location loc;
+
+ optional<string> ext (target::split_name (n, loc));
if (g != nullptr)
{
@@ -425,16 +427,14 @@ namespace build2
}
else
{
- // @@ TODO: currently this uses type as the ad hoc member identity.
- // Use inject_adhoc_group_member() variant?
- //
- add_adhoc_member (
+ add_adhoc_member_identity (
t,
e.type,
move (d),
dir_path (), // Always in out.
move (n),
- move (ext));
+ move (ext),
+ loc);
}
}
}