26 if (visited_nodes_.find(node) != visited_nodes_.end())
29 string pathstr = node->
path();
30 replace(pathstr.begin(), pathstr.end(),
'\\',
'/');
31 printf(
"\"%p\" [label=\"%s\"]\n", node, pathstr.c_str());
32 visited_nodes_.insert(node);
42 if (visited_edges_.find(edge) != visited_edges_.end())
44 visited_edges_.insert(edge);
48 if (!dyndep_loader_.LoadDyndeps(edge->
dyndep_, &err)) {
57 printf(
"\"%p\" -> \"%p\" [label=\" %s\"]\n",
60 printf(
"\"%p\" [label=\"%s\", shape=ellipse]\n",
62 for (vector<Node*>::iterator out = edge->
outputs_.begin();
63 out != edge->
outputs_.end(); ++out) {
64 printf(
"\"%p\" -> \"%p\"\n", edge, *out);
66 for (vector<Node*>::iterator in = edge->
inputs_.begin();
67 in != edge->
inputs_.end(); ++in) {
68 const char* order_only =
"";
70 order_only =
" style=dotted";
71 printf(
"\"%p\" -> \"%p\" [arrowhead=none%s]\n", (*in), edge, order_only);
75 for (vector<Node*>::iterator in = edge->
inputs_.begin();
76 in != edge->
inputs_.end(); ++in) {
82 printf(
"digraph ninja {\n");
83 printf(
"rankdir=\"LR\"\n");
84 printf(
"node [fontsize=10, shape=box, height=0.25]\n");
85 printf(
"edge [fontsize=10]\n");
An edge in the dependency graph; links between Nodes using Rules.
std::vector< Node * > outputs_
bool is_order_only(size_t index)
std::vector< Node * > inputs_
void AddTarget(Node *node)
Information about a node in the dependency graph: the file, whether it's dirty, mtime,...
const std::string & path() const
bool dyndep_pending() const
const std::string & name() const
void Warning(const char *msg, va_list ap)