diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-08 13:18:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-08 13:18:31 +0200 |
commit | eebb47a613e47b2c25d64d5766323dfeeb5c3a73 (patch) | |
tree | a4a01e0dcd59e5efb12abfcc6c5d15def54c533d /libbuild2/target.ixx | |
parent | 758a50eb1825f2e0c1acd5c61d36bb5b866585b8 (diff) |
Hash ad hoc prerequsites for ad hoc recipe change detection
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 9 |
1 files changed, 6 insertions, 3 deletions
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 |