Ninja
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DependencyScan Struct Reference

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

BuildLogbuild_log () const
 
 DependencyScan (State *state, BuildLog *build_log, DepsLog *deps_log, DiskInterface *disk_interface)
 
DepsLogdeps_log () const
 
bool RecomputeDirty (Edge *edge, string *err)
 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. More...
 
bool RecomputeOutputsDirty (Edge *edge, Node *most_recent_input)
 Recompute whether any output of the edge is dirty. More...
 
void set_build_log (BuildLog *log)
 

Private Member Functions

bool RecomputeOutputDirty (Edge *edge, Node *most_recent_input, const string &command, Node *output)
 Recompute whether a given single output should be marked dirty. More...
 

Private Attributes

BuildLogbuild_log_
 
ImplicitDepLoader dep_loader_
 
DiskInterfacedisk_interface_
 

Detailed Description

DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges.

Definition at line 238 of file graph.h.

Constructor & Destructor Documentation

DependencyScan::DependencyScan ( State state,
BuildLog build_log,
DepsLog deps_log,
DiskInterface disk_interface 
)
inline

Definition at line 239 of file graph.h.

Member Function Documentation

BuildLog* DependencyScan::build_log ( ) const
inline

Definition at line 255 of file graph.h.

Referenced by Builder::FinishCommand().

DepsLog* DependencyScan::deps_log ( ) const
inline

Definition at line 262 of file graph.h.

Referenced by Builder::FinishCommand().

bool DependencyScan::RecomputeDirty ( Edge edge,
string *  err 
)

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.

Definition at line 60 of file graph.cc.

References Edge::deps_missing_, Node::dirty(), EXPLAIN, Node::in_edge(), Edge::inputs_, Edge::is_order_only(), Edge::is_phony(), Node::mtime(), Edge::outputs_, and Edge::outputs_ready_.

Referenced by Builder::AddTarget(), and TEST_F().

bool DependencyScan::RecomputeOutputDirty ( Edge edge,
Node most_recent_input,
const string &  command,
Node output 
)
private

Recompute whether a given single output should be marked dirty.

Returns true if so.

Definition at line 145 of file graph.cc.

References BuildLog::LogEntry::command_hash, Node::exists(), EXPLAIN, Edge::GetBindingBool(), BuildLog::LogEntry::HashCommand(), Edge::inputs_, Edge::is_phony(), Node::mtime(), Node::path(), and BuildLog::LogEntry::restat_mtime.

bool DependencyScan::RecomputeOutputsDirty ( Edge edge,
Node most_recent_input 
)

Recompute whether any output of the edge is dirty.

Returns true if so.

Definition at line 133 of file graph.cc.

References Edge::EvaluateCommand(), and Edge::outputs_.

Referenced by Plan::CleanNode().

void DependencyScan::set_build_log ( BuildLog log)
inline

Definition at line 258 of file graph.h.

Member Data Documentation

BuildLog* DependencyScan::build_log_
private

Definition at line 272 of file graph.h.

ImplicitDepLoader DependencyScan::dep_loader_
private

Definition at line 274 of file graph.h.

DiskInterface* DependencyScan::disk_interface_
private

Definition at line 273 of file graph.h.


The documentation for this struct was generated from the following files: