From 3641a52828d6074457dc14447faa68eb9eca4ee0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 27 Oct 2023 07:33:51 +0200 Subject: WIP: install: headers --- libbuild2/cc/install-rule.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libbuild2/cc/install-rule.cxx b/libbuild2/cc/install-rule.cxx index f6e6b71..5db19bc 100644 --- a/libbuild2/cc/install-rule.cxx +++ b/libbuild2/cc/install-rule.cxx @@ -102,7 +102,6 @@ namespace build2 if (const libx* l = pt->is_a ()) pt = link_member (*l, a, link_info (t.base_scope (), ot)); - // Note: not redundant since we could be returning a member. // if ((st && pt->is_a ()) || (at && pt->is_a ())) @@ -155,8 +154,8 @@ namespace build2 if (pt == nullptr) return make_pair (pt, options); - // Don't install executable's prerequisite headers and module - // interfaces. + // Don't install executable's or runtime-only library's prerequisite + // headers and module interfaces. // // Note that if they come from a group, then we assume the entire // group is not to be installed. @@ -173,7 +172,9 @@ namespace build2 (x_obj != nullptr && p.is_a (*x_obj))); }; - if (t.is_a ()) + if (t.is_a () || + (a.operation () != update_id && + me.cur_options == lib::option_install_runtime)) { if (header_source (p)) pt = nullptr; @@ -517,7 +518,9 @@ namespace build2 (x_obj != nullptr && p.is_a (*x_obj))); }; - if (t.is_a ()) + if (t.is_a () || + (a.operation () != update_id && + me.cur_options == lib::option_install_runtime)) { if (header_source (p)) pt = nullptr; -- cgit v1.1