summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-02-03 21:07:11 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-02-03 21:07:11 (GMT)
commitf38a52c8393f5c850e378e8e6ad97ba589c253db (patch)
tree22d9fa1c9770cc962037a779909925f3aa45ecd1 /src/manifest_parser.cc
parent27c87c5efdb5c5243550a9261c122a1e9d7d0c75 (diff)
parentcc39240a10fb040fca80bf3669245f2f2d5736c5 (diff)
downloadNinja-f38a52c8393f5c850e378e8e6ad97ba589c253db.zip
Ninja-f38a52c8393f5c850e378e8e6ad97ba589c253db.tar.gz
Ninja-f38a52c8393f5c850e378e8e6ad97ba589c253db.tar.bz2
Merge pull request #989 from bradking/implicit-outputs
Add support for build statement implicit outputs
Diffstat (limited to 'src/manifest_parser.cc')
-rw-r--r--src/manifest_parser.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/manifest_parser.cc b/src/manifest_parser.cc
index 8bdb330..be267a3 100644
--- a/src/manifest_parser.cc
+++ b/src/manifest_parser.cc
@@ -248,6 +248,20 @@ bool ManifestParser::ParseEdge(string* err) {
} while (!out.empty());
}
+ // Add all implicit outs, counting how many as we go.
+ int implicit_outs = 0;
+ if (lexer_.PeekToken(Lexer::PIPE)) {
+ for (;;) {
+ EvalString out;
+ if (!lexer_.ReadPath(&out, err))
+ return err;
+ if (out.empty())
+ break;
+ outs.push_back(out);
+ ++implicit_outs;
+ }
+ }
+
if (!ExpectToken(Lexer::COLON, err))
return false;
@@ -351,6 +365,7 @@ bool ManifestParser::ParseEdge(string* err) {
delete edge;
return true;
}
+ edge->implicit_outs_ = implicit_outs;
edge->inputs_.reserve(ins.size());
for (vector<EvalString>::iterator i = ins.begin(); i != ins.end(); ++i) {