|
Ninja
|
An edge in the dependency graph; links between Nodes using Rules. More...
#include <graph.h>
Public Member Functions | |
| void | Dump () |
| Edge () | |
| string | EvaluateCommand () |
| string | GetDescription () |
| bool | is_implicit (int index) |
| bool | is_order_only (int index) |
| bool | is_phony () const |
| bool | LoadDepFile (State *state, DiskInterface *disk_interface, string *err) |
| bool | outputs_ready () const |
| bool | RecomputeDirty (State *state, DiskInterface *disk_interface, string *err) |
| void | RecomputeOutputDirty (BuildLog *build_log, time_t most_recent_input, bool dirty, const string &command, Node *output) |
Public Attributes | |
| Env * | env_ |
| int | implicit_deps_ |
| vector< Node * > | inputs_ |
| int | order_only_deps_ |
| vector< Node * > | outputs_ |
| bool | outputs_ready_ |
| const Rule * | rule_ |
An edge in the dependency graph; links between Nodes using Rules.
| void Edge::Dump | ( | ) |
| string Edge::EvaluateCommand | ( | ) |
Definition at line 163 of file graph.cc.
References Rule::command_, EvalString::Evaluate(), and rule_.
Referenced by BuildStatus::BuildEdgeFinished(), BuildStatus::PrintStatus(), RecomputeDirty(), BuildLog::RecordCommand(), BuildTest::StartCommand(), RealCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
| string Edge::GetDescription | ( | ) |
Definition at line 168 of file graph.cc.
References Rule::description_, EvalString::Evaluate(), and rule_.
Referenced by BuildStatus::PrintStatus().
| bool Edge::is_implicit | ( | int | index | ) | [inline] |
| bool Edge::is_order_only | ( | int | index | ) | [inline] |
Definition at line 117 of file graph.h.
Referenced by GraphViz::AddTarget(), RecomputeDirty(), and TEST_F().
| bool Edge::is_phony | ( | ) | const |
Definition at line 248 of file graph.cc.
References State::kPhonyRule, and rule_.
Referenced by Plan::AddSubTarget(), Builder::FinishEdge(), RecomputeOutputDirty(), and Builder::StartEdge().
| bool Edge::LoadDepFile | ( | State * | state, |
| DiskInterface * | disk_interface, | ||
| string * | err | ||
| ) |
Definition at line 173 of file graph.cc.
References State::AddEdge(), StringPiece::AsString(), CanonicalizePath(), Rule::depfile_, EvalString::Evaluate(), State::GetNode(), implicit_deps_, Node::in_edge_, inputs_, MakefileParser::ins_, State::kPhonyRule, order_only_deps_, MakefileParser::out_, Node::out_edges_, outputs_, outputs_ready_, MakefileParser::Parse(), DiskInterface::ReadFile(), and rule_.
Referenced by RecomputeDirty().
| bool Edge::outputs_ready | ( | ) | const [inline] |
Definition at line 98 of file graph.h.
Referenced by Plan::AddSubTarget().
| bool Edge::RecomputeDirty | ( | State * | state, |
| DiskInterface * | disk_interface, | ||
| string * | err | ||
| ) |
Definition at line 31 of file graph.cc.
References State::build_log_, Rule::depfile_, EvalString::empty(), EvaluateCommand(), inputs_, is_order_only(), LoadDepFile(), outputs_, outputs_ready_, RecomputeOutputDirty(), and rule_.
Referenced by TEST_F().
| void Edge::RecomputeOutputDirty | ( | BuildLog * | build_log, |
| time_t | most_recent_input, | ||
| bool | dirty, | ||
| const string & | command, | ||
| Node * | output | ||
| ) |
Definition at line 89 of file graph.cc.
References BuildLog::LogEntry::command, Node::dirty_, FileStat::exists(), Node::file_, Rule::generator_, inputs_, is_phony(), BuildLog::LookupByOutput(), FileStat::mtime_, FileStat::path_, Rule::restat_, BuildLog::LogEntry::restat_mtime, and rule_.
Referenced by RecomputeDirty().
Definition at line 95 of file graph.h.
Referenced by State::AddEdge(), EdgeEnv::LookupVariable(), and ManifestParser::ParseEdge().
Definition at line 111 of file graph.h.
Referenced by LoadDepFile(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), and TEST_F().
| vector<Node*> Edge::inputs_ |
Definition at line 93 of file graph.h.
Referenced by State::AddIn(), Plan::AddSubTarget(), GraphViz::AddTarget(), Cleaner::DoCleanTarget(), Dump(), Builder::FinishEdge(), LoadDepFile(), EdgeEnv::LookupVariable(), RecomputeDirty(), RecomputeOutputDirty(), and TEST_F().
Definition at line 112 of file graph.h.
Referenced by Builder::FinishEdge(), LoadDepFile(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), and TEST_F().
| vector<Node*> Edge::outputs_ |
Definition at line 94 of file graph.h.
Referenced by State::AddOut(), GraphViz::AddTarget(), Dump(), Plan::EdgeFinished(), Builder::FinishEdge(), LoadDepFile(), EdgeEnv::LookupVariable(), RecomputeDirty(), BuildLog::RecordCommand(), BuildTest::StartCommand(), and Builder::StartEdge().
| bool Edge::outputs_ready_ |
Definition at line 96 of file graph.h.
Referenced by Plan::EdgeFinished(), LoadDepFile(), and RecomputeDirty().
| const Rule* Edge::rule_ |
Definition at line 92 of file graph.h.
Referenced by State::AddEdge(), GraphViz::AddTarget(), Dump(), EvaluateCommand(), Builder::FinishEdge(), GetDescription(), is_phony(), LoadDepFile(), RecomputeDirty(), RecomputeOutputDirty(), and BuildTest::StartCommand().
1.7.5.1