diff options
author | Qingning Huo <qingninghuo@gmail.com> | 2011-09-06 19:46:32 (GMT) |
---|---|---|
committer | Qingning Huo <qingninghuo@gmail.com> | 2011-09-06 19:46:32 (GMT) |
commit | 8efe599247c762caa6da54a1c10e37c538319669 (patch) | |
tree | 9a159b956cbb35c85d966f026e0b63ad713c862f /src/parsers_test.cc | |
parent | e292718907a60c464dbe471ccdc7014731a4b6a2 (diff) | |
download | Ninja-8efe599247c762caa6da54a1c10e37c538319669.zip Ninja-8efe599247c762caa6da54a1c10e37c538319669.tar.gz Ninja-8efe599247c762caa6da54a1c10e37c538319669.tar.bz2 |
Add depfile support to build command with multiple outputs (Fixes: #61)
parsers.cpp: allow depfile used at build command with multiple outputs.
graph.cpp: allow depfile used at build command with multiple outputs.
parsers_test.cpp: make the test pass.
As before, the depfile itself can only mention one target, which must
be the first of a build command with multiple outpus.
[There is really no need to mention all the output in the depfile,
because all targets should depend on exactly the same files anyway,
because these targets are built by a single build command.]
Diffstat (limited to 'src/parsers_test.cc')
-rw-r--r-- | src/parsers_test.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parsers_test.cc b/src/parsers_test.cc index 1ac5990..12f09b0 100644 --- a/src/parsers_test.cc +++ b/src/parsers_test.cc @@ -316,11 +316,10 @@ TEST_F(ParserTest, Errors) { State state; ManifestParser parser(&state, NULL); string err; - EXPECT_FALSE(parser.Parse("rule cc\n command = foo\n depfile = bar\n" + EXPECT_TRUE(parser.Parse("rule cc\n command = foo\n depfile = bar\n" "build a.o b.o: cc c.cc\n", &err)); - EXPECT_EQ("line 4, col 16: dependency files only work with " - "single-output rules", err); + EXPECT_EQ("", err); } { |