From 14c7d434df62989fbceef8322f61400844bd5943 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 27 Jan 2020 14:23:18 +0200 Subject: See through lib{} group during dist --- libbuild2/bin/init.cxx | 7 ++++++- libbuild2/bin/rule.cxx | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'libbuild2/bin') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 344d54e..c0681cc 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -539,7 +539,7 @@ namespace build2 r.insert (perform_id, 0, "bin.lib", lib_); r.insert (configure_id, 0, "bin.lib", lib_); - // Treat as a see through group for install and test. + // Treat as a see through group for install, test, and dist. // if (install_loaded) { @@ -553,6 +553,11 @@ namespace build2 { r.insert (perform_test_id, "bin.lib", m->group_rule ()); } + + if (rs.find_module ("dist")) + { + r.insert (dist_id, 0, "bin.lib", lib_); + } } return true; diff --git a/libbuild2/bin/rule.cxx b/libbuild2/bin/rule.cxx index 8c1174a..0bb5aed 100644 --- a/libbuild2/bin/rule.cxx +++ b/libbuild2/bin/rule.cxx @@ -53,11 +53,14 @@ namespace build2 } bool lib_rule:: - match (action, target& xt, const string&) const + match (action a, target& xt, const string&) const { lib& t (xt.as ()); - members bm (build_members (t.root_scope ())); + members bm (a.meta_operation () != dist_id + ? build_members (t.root_scope ()) + : members {true, true}); + t.a = bm.a ? &search (t, t.dir, t.out, t.name) : nullptr; t.s = bm.s ? &search (t, t.dir, t.out, t.name) : nullptr; -- cgit v1.1