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(), and RecomputeOutputDirty().

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 dep_loader_, Edge::deps_missing_, disk_interface_, EXPLAIN, Edge::inputs_, Edge::is_order_only(), Edge::is_phony(), ImplicitDepLoader::LoadDeps(), Node::mtime(), Edge::outputs_, Edge::outputs_ready_, and RecomputeOutputsDirty().

Referenced by Builder::AddTarget().

bool DependencyScan::RecomputeOutputDirty ( Edge edge,
Node most_recent_input,
const string &  command,
Node output 
)
private
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 disk_interface_, Edge::EvaluateCommand(), Edge::outputs_, and RecomputeOutputDirty().

Referenced by Plan::CleanNode(), and RecomputeDirty().

void DependencyScan::set_build_log ( BuildLog log)
inline

Definition at line 258 of file graph.h.

Referenced by Builder::SetBuildLog().

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.

Referenced by RecomputeDirty().

DiskInterface* DependencyScan::disk_interface_
private

Definition at line 273 of file graph.h.

Referenced by RecomputeDirty(), and RecomputeOutputsDirty().


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