aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-01-16 08:43:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-01-16 08:43:12 +0200
commit7d16f94b6c359930c8c69358b2fc8a120e13a271 (patch)
tree9ae46d1d5e737805b84bb36789e795b92c552359 /libbuild2
parent3925bdc7708abd4387a5ffb0db60bc57098f2669 (diff)
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.
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/parser.cxx6
1 files changed, 4 insertions, 2 deletions
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));