|
Ninja
|
DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges. More...
#include <graph.h>
Public Member Functions | |
| BuildLog * | build_log () const |
| DependencyScan (State *state, BuildLog *build_log, DepsLog *deps_log, DiskInterface *disk_interface, DepfileParserOptions const *depfile_parser_options) | |
| DepsLog * | deps_log () const |
| bool | LoadDyndeps (Node *node, std::string *err) const |
| Load a dyndep file from the given node's path and update the build graph with the new information. More... | |
| bool | LoadDyndeps (Node *node, DyndepFile *ddf, std::string *err) const |
| bool | RecomputeDirty (Node *node, std::string *err) |
| Update the |dirty_| state of the given node by inspecting its input edge. More... | |
| bool | RecomputeOutputsDirty (Edge *edge, Node *most_recent_input, bool *dirty, std::string *err) |
| Recompute whether any output of the edge is dirty, if so sets |*dirty|. More... | |
| void | set_build_log (BuildLog *log) |
Private Member Functions | |
| bool | RecomputeDirty (Node *node, std::vector< Node *> *stack, std::string *err) |
| bool | RecomputeOutputDirty (const Edge *edge, const Node *most_recent_input, const std::string &command, Node *output) |
| Recompute whether a given single output should be marked dirty. More... | |
| bool | VerifyDAG (Node *node, std::vector< Node *> *stack, std::string *err) |
Private Attributes | |
| BuildLog * | build_log_ |
| ImplicitDepLoader | dep_loader_ |
| DiskInterface * | disk_interface_ |
| DyndepLoader | dyndep_loader_ |
DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges.
|
inline |
|
inline |
Definition at line 288 of file graph.h.
References build_log_.
Referenced by Builder::Build(), and Builder::FinishCommand().
|
inline |
Definition at line 295 of file graph.h.
References dep_loader_, and ImplicitDepLoader::deps_log().
Referenced by Builder::FinishCommand().
| bool DependencyScan::LoadDyndeps | ( | Node * | node, |
| std::string * | err | ||
| ) | const |
Load a dyndep file from the given node's path and update the build graph with the new information.
One overload accepts a caller-owned 'DyndepFile' object in which to store the information loaded from the dyndep file.
Referenced by Builder::LoadDyndeps().
| bool DependencyScan::LoadDyndeps | ( | Node * | node, |
| DyndepFile * | ddf, | ||
| std::string * | err | ||
| ) | const |
| bool DependencyScan::RecomputeDirty | ( | Node * | node, |
| std::string * | err | ||
| ) |
Update the |dirty_| state of the given node by inspecting its input edge.
Examine inputs, outputs, and command lines to judge whether an edge needs to be re-run, and update outputs_ready_ and each outputs' |dirty_| state accordingly. Returns false on failure.
Referenced by Plan::RefreshDyndepDependents().
|
private |
|
private |
Recompute whether a given single output should be marked dirty.
Returns true if so.
Definition at line 228 of file graph.cc.
References BuildLog::LogEntry::command_hash, Node::exists(), EXPLAIN, Edge::GetBindingBool(), BuildLog::LogEntry::HashCommand(), Edge::inputs_, Edge::is_phony(), BuildLog::LogEntry::mtime, Node::mtime(), Node::path(), and PRId64.
| bool DependencyScan::RecomputeOutputsDirty | ( | Edge * | edge, |
| Node * | most_recent_input, | ||
| bool * | dirty, | ||
| std::string * | err | ||
| ) |
Recompute whether any output of the edge is dirty, if so sets |*dirty|.
Returns false on failure.
Definition at line 215 of file graph.cc.
References Edge::EvaluateCommand(), and Edge::outputs_.
Referenced by Plan::CleanNode().
|
inline |
Definition at line 291 of file graph.h.
References build_log_.
Referenced by Builder::SetBuildLog().
|
private |
Definition at line 176 of file graph.cc.
References Node::in_edge(), Edge::mark_, Edge::maybe_phonycycle_diagnostic(), and Edge::VisitInStack.
|
private |
Definition at line 315 of file graph.h.
Referenced by build_log(), and set_build_log().
|
private |
Definition at line 317 of file graph.h.
Referenced by deps_log().
|
private |
|
private |
1.8.14