From b85ec1f2cc27ee178488de480eb3f64245a6e563 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Oct 2022 12:17:15 +0200 Subject: Ignore post hoc prerequisites in dist rule --- libbuild2/dist/rule.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbuild2') diff --git a/libbuild2/dist/rule.cxx b/libbuild2/dist/rule.cxx index e47f1f8..0c72ff5 100644 --- a/libbuild2/dist/rule.cxx +++ b/libbuild2/dist/rule.cxx @@ -33,7 +33,13 @@ namespace build2 group_prerequisite_members (a, t, members_mode::maybe)) { // Note: no exclusion tests, we want all of them (and see also the - // dist_include() override). + // dist_include() override). But if we don't ignore post hoc ones + // here, we will end up with a cycle (they will still be handled + // by the post-pass). + // + lookup l; // Ignore any operation-specific values. + if (include (a, t, pm, &l) == include_type::posthoc) + continue; // Skip prerequisites imported from other projects. // -- cgit v1.1