diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-24 10:29:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-24 10:29:09 +0200 |
commit | f1c981a22365411794806ed0744b857ef0804e35 (patch) | |
tree | af453c932bfa597a04dc7af17d5f5720f863d081 /libbuild2/cc/link-rule.cxx | |
parent | 1c12242aa7cd00e35a9be43b664e5486b2adc846 (diff) |
Allow ad hoc rules not to list targets that are updated during match
For example, this allows a Qt moc rule not to list generated headers
from libQtCore since they are pre-generated by the library.
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 0081fe2..d0a1f4a 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -1003,7 +1003,7 @@ namespace build2 if (*um) { pto.target = &p.search (t); // mark 0 - pto.include |= 2; + pto.include |= prerequisite_target::include_udm; update_match = true; } } @@ -1144,7 +1144,7 @@ namespace build2 if (const libx* l = pt->is_a<libx> ()) { pt = link_member (*l, a, li); - pto.include |= 4; + pto.include |= include_group; } } else @@ -1231,7 +1231,7 @@ namespace build2 << "not supported by this rule"; m = 0; - pto.include |= 2; + pto.include |= prerequisite_target::include_udm; update_match = true; } } @@ -1245,10 +1245,14 @@ namespace build2 // of the libraries (for example, if generation requires some of the // metadata; think poptions needed by Qt moc). // - match_members (a, t, pts, start, {2 /* mask */, 0 /* value */}); + { + auto mask (prerequisite_target::include_udm); - if (update_match) - match_members (a, t, pts, start, {2, 2}); + match_members (a, t, pts, start, {mask, 0}); + + if (update_match) + match_members (a, t, pts, start, {mask, mask}); + } // Check if we have any binful utility libraries. // @@ -1383,7 +1387,7 @@ namespace build2 // prerequisite_target::data. // if (update_match) - update_during_match_prerequisites (trace, a, t, 2 /* mask */); + update_during_match_prerequisites (trace, a, t); // Now that we know for sure whether we are binless, derive file name(s) // and add ad hoc group members. Note that for binless we still need the |