summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/graph.cc b/src/graph.cc
index d881280..424f941 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -177,6 +177,11 @@ string Edge::EvaluateCommand() {
return rule_->command_.Evaluate(&env);
}
+string Edge::EvaluateDepFile() {
+ EdgeEnv env(this);
+ return rule_->depfile_.Evaluate(&env);
+}
+
string Edge::GetDescription() {
EdgeEnv env(this);
return rule_->description_.Evaluate(&env);
@@ -184,9 +189,7 @@ string Edge::GetDescription() {
bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface,
string* err) {
- EdgeEnv env(this);
- string path = rule_->depfile_.Evaluate(&env);
-
+ string path = EvaluateDepFile();
string content = disk_interface->ReadFile(path, err);
if (!err->empty())
return false;