From e7daf01b84ee6ae96915390d9e2f3c5defaaf1ca Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Nov 2018 14:41:56 +0200 Subject: Tweak in rule to ensure correct mtime order --- build2/in/rule.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build2/in/rule.cxx b/build2/in/rule.cxx index 545ded5..7b3904c 100644 --- a/build2/in/rule.cxx +++ b/build2/in/rule.cxx @@ -378,7 +378,9 @@ namespace build2 } what = "write"; whom = &tp; - ofs << s << endl; + if (ln != 1) + ofs << endl; // See below. + ofs << s; } // Close depdb before closing the output file so its mtime is not @@ -387,6 +389,7 @@ namespace build2 dd.close (); what = "close"; whom = &tp; + ofs << endl; // Last write to make sure our mtime is older than dd. ofs.close (); arm.cancel (); -- cgit v1.1