From 3925bdc7708abd4387a5ffb0db60bc57098f2669 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jan 2024 08:07:04 +0200 Subject: Add add_adhoc_member_identity(), use to fix ad hoc pattern rule logic --- libbuild2/adhoc-rule-regex-pattern.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libbuild2/adhoc-rule-regex-pattern.cxx') 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 ext (target::split_name (n, location ())); + location loc; + + optional 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); } } } -- cgit v1.1