From 634048a861658af2bc5c37507bf96116cf1968aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Feb 2022 10:03:43 +0200 Subject: Add update operation-specific variable with unmatch|match additional values Note that the unmatch (match but do not update) and match (update during match) values are only supported by certain rules (and potentially only for certain prerequisite types). Additionally: - All operation-specific variables are now checked for false as an override for the prerequisite-specific include value. In particular, this can now be used to disable a prerequisite for update, for example: ./: exe{test}: update = false - The cc::link_rule now supports the update=match value for headers and ad hoc prerequisites. In particular, this can be used to make sure all the library headers are updated before matching any of its (or dependent's) object files. --- libbuild2/dyndep.hxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libbuild2/dyndep.hxx') diff --git a/libbuild2/dyndep.hxx b/libbuild2/dyndep.hxx index 257ef7b..6632eb6 100644 --- a/libbuild2/dyndep.hxx +++ b/libbuild2/dyndep.hxx @@ -22,9 +22,12 @@ namespace build2 class LIBBUILD2_SYMEXPORT dyndep_rule { public: - // Update the target during the match phase. Return true if it has changed - // or if the passed timestamp is not timestamp_unknown and is older than - // the target. + // Update the target during the match phase. Return true if the target has + // changed or, if the passed timestamp is not timestamp_unknown, it is + // older than the target. + // + // Note that such a target must still be updated during the execute phase + // in order to keep the dependency counts straight. // static bool update (tracer&, action, const target&, timestamp); -- cgit v1.1