From 5f9dcd5364993f32e6841ffdfefce1cc87017b22 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Nov 2018 12:24:38 +0200 Subject: Make backwards modification time check permanent, add another experiment --- build2/cli/rule.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'build2/cli') diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index 6c87490..d07af15 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -234,9 +234,8 @@ namespace build2 // We use depdb to track changes to the .cli file name, options, // compiler, etc. // + depdb dd (tp + ".d"); { - depdb dd (tp + ".d"); - // First should come the rule name/version. // if (dd.expect ("cli.compile 1") != nullptr) @@ -259,14 +258,14 @@ namespace build2 // if (dd.expect (s.path ()) != nullptr) l4 ([&]{trace << "input file mismatch forcing update of " << t;}); + } - // Update if depdb mismatch. - // - if (dd.writing () || dd.mtime > mt) - update = true; + // Update if depdb mismatch. + // + if (dd.writing () || dd.mtime > mt) + update = true; - dd.close (); - } + dd.close (); // If nothing changed, then we are done. // @@ -325,6 +324,8 @@ namespace build2 run (cli, args); + dd.verify (tp); + t.mtime (system_clock::now ()); return target_state::changed; } -- cgit v1.1