diff options
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/build.h b/src/build.h index 1b596b3..ab59f0c 100644 --- a/src/build.h +++ b/src/build.h @@ -64,7 +64,9 @@ struct Plan { }; /// Mark an edge as done building (whether it succeeded or failed). - /// Returns 'true'. + /// If any of the edge's outputs are dyndep bindings of their dependents, + /// this loads dynamic dependencies from the nodes' paths. + /// Returns 'false' if loading dyndep info fails and 'true' otherwise. bool EdgeFinished(Edge* edge, EdgeResult result, string* err); /// Clean the given node during the build. @@ -77,11 +79,20 @@ struct Plan { /// Reset state. Clears want and ready sets. void Reset(); + /// Update the build plan to account for modifications made to the graph + /// by information loaded from a dyndep file. + bool DyndepsLoaded(DependencyScan* scan, Node* node, + const DyndepFile& ddf, string* err); private: - bool AddSubTarget(Node* node, Node* dependent, string* err); + bool RefreshDyndepDependents(DependencyScan* scan, Node* node, string* err); + void UnmarkDependents(Node* node, set<Node*>* dependents); + bool AddSubTarget(Node* node, Node* dependent, string* err, + set<Edge*>* dyndep_walk); /// Update plan with knowledge that the given node is up to date. - /// Returns 'true'. + /// If the node is a dyndep binding on any of its dependents, this + /// loads dynamic dependencies from the node's path. + /// Returns 'false' if loading dyndep info fails and 'true' otherwise. bool NodeFinished(Node* node, string* err); /// Enumerate possible steps we want for an edge. @@ -199,6 +210,9 @@ struct Builder { scan_.set_build_log(log); } + /// Load the dyndep information provided by the given node. + bool LoadDyndeps(Node* node, string* err); + State* state_; const BuildConfig& config_; Plan plan_; @@ -229,6 +243,7 @@ struct BuildStatus { void BuildEdgeStarted(Edge* edge); void BuildEdgeFinished(Edge* edge, bool success, const string& output, int* start_time, int* end_time); + void BuildLoadDyndeps(); void BuildStarted(); void BuildFinished(); |