From 4dabe6e1fb2ebf714582a50d582c1f9e2efc08a3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Nov 2015 18:17:45 +0200 Subject: Don't try to install targets from other projects --- build/install/rule.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build/install') diff --git a/build/install/rule.cxx b/build/install/rule.cxx index 6f0f95f..bd538ed 100644 --- a/build/install/rule.cxx +++ b/build/install/rule.cxx @@ -121,8 +121,16 @@ namespace build // run standard search_and_match()? Will need an indicator // that it was forced (e.g., [install]) for filter() below. // + scope& rs (t.root_scope ()); + for (prerequisite_member p: group_prerequisite_members (a, t)) { + // Ignore unresolved targets that are imported from other projects. + // We are definitely not installing those. + // + if (p.proj () != nullptr) + continue; + // @@ This is where we will handle [noinstall]. // @@ -134,6 +142,12 @@ namespace build continue; target& pt (p.search ()); + + // Ignore targets that are outside of our project. + // + if (!pt.in (rs)) + continue; + build::match (a, pt); // If the matched rule returned noop_recipe, then the target -- cgit v1.1