Skip to content

Commit

Permalink
Merge pull request ninja-build#59 from qhuo/multiple-outputs-fix
Browse files Browse the repository at this point in the history
Multiple outputs fix: make $out include all outptus
  • Loading branch information
evmar committed Jun 14, 2011
2 parents cf2f625 + edc4062 commit b1ba559
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/build_log_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#include <share.h>
#endif

#ifdef linux
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#endif

static const char kTestFilename[] = "BuildLogTest-tempfile";

struct BuildLogTest : public StateTestWithBuiltinRules {
Expand Down
7 changes: 6 additions & 1 deletion src/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ struct EdgeEnv : public Env {
result.append((*i)->file_->path_);
}
} else if (var == "out") {
result = edge_->outputs_[0]->file_->path_;
for (vector<Node*>::iterator i = edge_->outputs_.begin();
i != edge_->outputs_.end(); ++i) {
if (!result.empty())
result.push_back(' ');
result.append((*i)->file_->path_);
}
} else if (edge_->env_) {
return edge_->env_->LookupVariable(var);
}
Expand Down

0 comments on commit b1ba559

Please sign in to comment.