aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-03 12:48:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-07 13:58:48 +0200
commit8475c82a2ca186f4ca987e50b4249bb8eb32ba01 (patch)
tree20c782983f70f7e45ab71ce347ffba3d53650e25 /libbuild2/cc/compile-rule.cxx
parentd28553772a3010fb545eae09967fa54adbe63bdb (diff)
Add support for update=unmatch|match to ad hoc recipes
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r--libbuild2/cc/compile-rule.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index aaaa43c..e7e90ad 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -1010,7 +1010,7 @@ namespace build2
// @@ If for some reason unmatch fails, this messes up the for_install
// logic because we will update this library during match. Perhaps
// we should postpone updating them until execute if we failed to
- // unmatch.
+ // unmatch. See how we do this in ad hoc rule.
//
pair<bool, target_state> mr (
build2::match (
@@ -5889,7 +5889,10 @@ namespace build2
ps.push_back (prerequisite (lt));
for (prerequisite_member p: group_prerequisite_members (a, lt))
{
- if (include (a, lt, p) != include_type::normal) // Excluded/ad hoc.
+ // Ignore update=match.
+ //
+ lookup l;
+ if (include (a, lt, p, &l) != include_type::normal) // Excluded/ad hoc.
continue;
if (p.is_a<libx> () ||
@@ -6123,7 +6126,10 @@ namespace build2
//
for (prerequisite_member p: group_prerequisite_members (a, t))
{
- if (include (a, t, p) != include_type::normal) // Excluded/ad hoc.
+ // Ignore update=match.
+ //
+ lookup l;
+ if (include (a, t, p, &l) != include_type::normal) // Excluded/ad hoc.
continue;
if (p.is_a<libx> () ||