From 7d16f94b6c359930c8c69358b2fc8a120e13a271 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jan 2024 08:43:12 +0200 Subject: Don't enter exported buildfile as real targets (GH issue #357) In particular, this used to prevent file_rule from match such targets for clean. --- libbuild2/parser.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libbuild2/parser.cxx') diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 0fcf977..b695018 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -9523,7 +9523,9 @@ namespace build2 if (n.extension () == build_ext) { - // Similar to above, enter as real. + // Enter as if found by search_existing_file(). Note that + // entering it as real would cause file_rule not to match + // for clean. // // Note that these targets may already be entered (for // example, if already imported). @@ -9536,7 +9538,7 @@ namespace build2 : out_src (d, *root_)), n.base ().string (), build_ext, - target_decl::real, + target_decl::prereq_file, trace).first); ct->prerequisites_.push_back (prerequisite (bf)); -- cgit v1.1