summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-09-19 01:56:15 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-24 00:16:38 (GMT)
commit0efbbbf67a94452919084765e87106e7748274cb (patch)
tree21c8c5a13b70d7f287b2f569a35f6a03a7f1c19d /src/build.h
parent386cbf6c7e49c88b87f54619b06670ea9f66c8a5 (diff)
downloadNinja-0efbbbf67a94452919084765e87106e7748274cb.zip
Ninja-0efbbbf67a94452919084765e87106e7748274cb.tar.gz
Ninja-0efbbbf67a94452919084765e87106e7748274cb.tar.bz2
Implement restat rules
A restat rule is a rule which is capable of pruning the build tree depending on the timestamps of its outputs before and after a build. After a restat rule is rebuilt, Ninja will re-stat each output file to obtain its current timestamp. If the timestamp is unchanged from when Ninja initially stat'ed the file before starting the build, Ninja will mark that output file as clean, and recursively for each reverse dependency of the output file, recompute its dirty status. Ninja then stores the most recent timestamp of any input file in the build log entry associated with the output file. This timestamp will be treated by future invocations of Ninja as the output file's modification time instead of the output file's actual modification time for the purpose of deciding whether it is dirty (but not whether its reverse dependencies are dirty).
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/build.h b/src/build.h
index fa0abd2..586d1ff 100644
--- a/src/build.h
+++ b/src/build.h
@@ -22,6 +22,7 @@
#include <vector>
using namespace std;
+struct BuildLog;
struct Edge;
struct DiskInterface;
struct Node;
@@ -51,6 +52,9 @@ struct Plan {
/// tests.
void EdgeFinished(Edge* edge);
+ /// Clean the given node during the build.
+ void CleanNode(BuildLog* build_log, Node* node);
+
/// Number of edges with commands to run.
int command_edge_count() const { return command_edges_; }