summaryrefslogtreecommitdiffstats
path: root/src/parsers.cc
diff options
context:
space:
mode:
authorunknown <petr@meloun.(none)>2012-02-09 21:23:35 (GMT)
committerunknown <petr@meloun.(none)>2012-02-09 21:23:35 (GMT)
commitaf070e520806987bd3b175bf222774de923b62dd (patch)
tree0eff2859034dd46b6cbd8bd93fed41b8824e642e /src/parsers.cc
parent7504ab4e5dbb153979333c67a8a43448040b718d (diff)
downloadNinja-af070e520806987bd3b175bf222774de923b62dd.zip
Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.gz
Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.bz2
Response files
Diffstat (limited to 'src/parsers.cc')
-rw-r--r--src/parsers.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parsers.cc b/src/parsers.cc
index 5d347b2..c3844fb 100644
--- a/src/parsers.cc
+++ b/src/parsers.cc
@@ -121,6 +121,10 @@ bool ManifestParser::ParseRule(string* err) {
rule->generator_ = true;
} else if (key == "restat") {
rule->restat_ = true;
+ } else if (key == "rspfile") {
+ rule->rspfile_ = value;
+ } else if (key == "rspfile_content") {
+ rule->rspfile_content_ = value;
} else {
// Die on other keyvals for now; revisit if we want to add a
// scope here.
@@ -128,6 +132,9 @@ bool ManifestParser::ParseRule(string* err) {
}
}
+ if (rule->rspfile_.empty() != rule->rspfile_content_.empty())
+ return lexer_.Error("rspfile and rspfile_content need to be both specified", err);
+
if (rule->command_.empty())
return lexer_.Error("expected 'command =' line", err);