From 53b6896e48aaa6ee2b414bd36275263c57b490f8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Feb 2024 08:39:58 +0200 Subject: Avoid duplicate fsdir{} in inject_fsdir(), match_prerequisite*() call sequences --- libbuild2/algorithm.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libbuild2/algorithm.hxx') diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index 64660a9..1c5b717 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -659,8 +659,13 @@ namespace build2 // // As an extension, unless prereq is false, this function will also search // for an existing fsdir{} prerequisite for the directory and if one exists, - // return that (even if the target is in src tree). This can be used, for - // example, to place output into an otherwise non-existent directory. + // return that (even if the target is in the src tree). In this case, the + // injected fsdir{} (if any) must be the first prerequisite in this target's + // prerequisite_targets, which is relied upon by the match_prerequisite*() + // family of functons to suppress the duplicate addition. + // + // Note that the explicit fsdir{} prerquiste is used to place output into an + // otherwise non-existent (in src) directory. // LIBBUILD2_SYMEXPORT const fsdir* inject_fsdir (action, target&, -- cgit v1.1