aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-08 14:20:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-08 14:20:46 +0200
commitb601cf3e41b17d66c412dac7be9e361d65898c7b (patch)
treea535d73745d6974e67ddb7ca6ebb56f68a4915bc
parenteebb47a613e47b2c25d64d5766323dfeeb5c3a73 (diff)
Improve depdb::check_mtime() diagnostics
-rw-r--r--libbuild2/depdb.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbuild2/depdb.cxx b/libbuild2/depdb.cxx
index d88999d..4a40862 100644
--- a/libbuild2/depdb.cxx
+++ b/libbuild2/depdb.cxx
@@ -357,6 +357,10 @@ namespace build2
// information for some platforms.
//
timestamp t_mt (build2::mtime (t));
+
+ if (t_mt == timestamp_nonexistent)
+ fail << "target file " << t << " does not exist at the end of recipe";
+
timestamp d_mt (build2::mtime (path));
if (d_mt > t_mt)
@@ -384,6 +388,10 @@ namespace build2
using build2::mtime;
timestamp t_mt (mtime (t));
+
+ if (t_mt == timestamp_nonexistent)
+ fail << "target file " << t << " does not exist at the end of recipe";
+
timestamp d_mt (mtime (d));
if (d_mt > t_mt)