From eebb47a613e47b2c25d64d5766323dfeeb5c3a73 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 8 Jun 2020 13:18:31 +0200 Subject: Hash ad hoc prerequsites for ad hoc recipe change detection --- libbuild2/target.ixx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libbuild2/target.ixx') diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 611e562..445c413 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -522,7 +522,12 @@ namespace build2 newer (timestamp mt) const { assert (ctx.phase == run_phase::execute); + return newer (mt, executed_state_impl (action () /* inner */)); + } + inline bool mtime_target:: + newer (timestamp mt, target_state s) const + { timestamp mp (mtime ()); // What do we do if timestamps are equal? This can happen, for example, @@ -530,9 +535,7 @@ namespace build2 // much we can do here except detect the case where the target was // changed on this run. // - return mt < mp || (mt == mp && - executed_state_impl (action () /* inner */) == - target_state::changed); + return mt < mp || (mt == mp && s == target_state::changed); } // path_target -- cgit v1.1