Ninja
Public Member Functions | Public Attributes
Builder Struct Reference

Builder wraps the build process: starting commands, updating status. More...

#include <build.h>

List of all members.

Public Member Functions

NodeAddTarget (const string &name, string *err)
bool AddTarget (Node *target, string *err)
 Add a target to the build, scanning dependencies.
bool AlreadyUpToDate () const
 Returns true if the build targets are already up to date.
bool Build (string *err)
 Run the build.
 Builder (State *state, const BuildConfig &config)
void FinishEdge (Edge *edge, bool success, const string &output)
bool StartEdge (Edge *edge, string *err)

Public Attributes

CommandRunnercommand_runner_
const BuildConfigconfig_
DiskInterfacedisk_interface_
struct BuildLoglog_
Plan plan_
Statestate_
struct BuildStatusstatus_

Detailed Description

Builder wraps the build process: starting commands, updating status.

Definition at line 110 of file build.h.


Constructor & Destructor Documentation

Builder::Builder ( State state,
const BuildConfig config 
)

Member Function Documentation

Node * Builder::AddTarget ( const string &  name,
string *  err 
)

Definition at line 445 of file build.cc.

References State::LookupNode(), and state_.

Referenced by main().

bool Builder::AddTarget ( Node target,
string *  err 
)

Add a target to the build, scanning dependencies.

Returns:
false on error.

Definition at line 456 of file build.cc.

References Plan::AddTarget(), disk_interface_, Node::file_, Node::in_edge_, plan_, state_, and FileStat::StatIfNecessary().

bool Builder::AlreadyUpToDate ( ) const

Returns true if the build targets are already up to date.

Definition at line 471 of file build.cc.

References Plan::more_to_do(), and plan_.

Referenced by Build(), and main().

bool Builder::Build ( string *  err)
void Builder::FinishEdge ( Edge edge,
bool  success,
const string &  output 
)
bool Builder::StartEdge ( Edge edge,
string *  err 
)

Member Data Documentation

Definition at line 133 of file build.h.

Referenced by Build(), Builder(), BuildTest::BuildTest(), and StartEdge().

Definition at line 130 of file build.h.

Referenced by Build().

Definition at line 132 of file build.h.

Referenced by AddTarget(), Builder(), BuildTest::BuildTest(), FinishEdge(), and StartEdge().

Definition at line 135 of file build.h.

Referenced by Builder(), BuildWithLogTest::BuildWithLogTest(), and FinishEdge().

Definition at line 131 of file build.h.

Referenced by AddTarget(), AlreadyUpToDate(), Build(), and FinishEdge().

Definition at line 129 of file build.h.

Referenced by AddTarget().

Definition at line 134 of file build.h.

Referenced by Build(), Builder(), FinishEdge(), and StartEdge().


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