diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-02-03 21:07:11 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-02-03 21:07:11 (GMT) |
commit | f38a52c8393f5c850e378e8e6ad97ba589c253db (patch) | |
tree | 22d9fa1c9770cc962037a779909925f3aa45ecd1 /src/manifest_parser.cc | |
parent | 27c87c5efdb5c5243550a9261c122a1e9d7d0c75 (diff) | |
parent | cc39240a10fb040fca80bf3669245f2f2d5736c5 (diff) | |
download | Ninja-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.cc | 15 |
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) { |