aboutsummaryrefslogtreecommitdiff
path: root/rule.cc
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-09-11 15:39:29 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-09-11 15:39:29 +0900
commit36b6582e5690f473f8ebbd6e255df92b955c696e (patch)
tree1d8aaa70187855df0586d067739d1b9748ec8180 /rule.cc
parent7f3a87082767f39310a9ae0affd716cbbcbeace8 (diff)
[C++] Fix for multiple output patterns in a rule
Diffstat (limited to 'rule.cc')
-rw-r--r--rule.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/rule.cc b/rule.cc
index 0a81c69..175b43a 100644
--- a/rule.cc
+++ b/rule.cc
@@ -68,9 +68,8 @@ void ParseRule(Loc& loc, StringPiece line, char term,
const bool is_first_pattern = (
!outputs.empty() && IsPatternRule(outputs[0].str()));
- if (is_first_pattern) {
- if (outputs.size() > 1) {
- // TODO: Multiple output patterns are not supported yet.
+ for (size_t i = 1; i < outputs.size(); i++) {
+ if (IsPatternRule(outputs[i].str()) != is_first_pattern) {
ERROR("%s:%d: *** mixed implicit and normal rules: deprecated syntax",
LOCF(loc));
}