diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-29 08:02:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-29 08:02:51 +0200 |
commit | 05afdd8ca16c7066d12510a27e2fc08743bb2e95 (patch) | |
tree | 90c7a43a08c47786df3869d68d7b625bf93174d3 /libbuild2/context.cxx | |
parent | 472d6d0e49c0114f46ff31267d09acdbf9fba421 (diff) |
Fix backlink logic for target groups
We used to backlink ad hoc group members both via the group and as individual
members. And for explicit groups it was done only via individual members,
which means it only works correctly if every member is individually updated.
Now both types of groups are backlinked from the group target.
Diffstat (limited to 'libbuild2/context.cxx')
-rw-r--r-- | libbuild2/context.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index 4858c4c..1da6fd3 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -614,13 +614,15 @@ namespace build2 var_extension = &vp.insert<string> ("extension", v_t); var_update = &vp.insert<string> ("update", v_q); var_clean = &vp.insert<bool> ("clean", v_t); - var_backlink = &vp.insert<string> ("backlink", v_t); + var_backlink = &vp.insert ("backlink", v_t); // Untyped. var_include = &vp.insert<string> ("include", v_q); // Backlink executables and (generated) documentation by default. // - gs.target_vars[exe::static_type]["*"].assign (var_backlink) = "true"; - gs.target_vars[doc::static_type]["*"].assign (var_backlink) = "true"; + gs.target_vars[exe::static_type]["*"].assign (var_backlink) = + names {name ("true")}; + gs.target_vars[doc::static_type]["*"].assign (var_backlink) = + names {name ("true")}; // Register builtin rules. // |