Lines Matching refs:rule

76         : rule(r), suffix(s) {  in Entry()
78 const Rule* rule; member
89 void Add(StringPiece name, const Rule* rule) { in Add() argument
91 rules_.push_back(Entry(rule, name)); in Add()
99 p.first->second->Add(name.substr(1), rule); in Add()
106 rules->push_back(ent.rule); in Get()
368 for (const Rule* rule : rules) { in PopulateRules() local
369 if (rule->outputs.empty()) { in PopulateRules()
370 PopulateImplicitRule(rule); in PopulateRules()
372 PopulateExplicitRule(rule); in PopulateRules()
380 bool PopulateSuffixRule(const Rule* rule, Symbol output) { in PopulateSuffixRule() argument
389 shared_ptr<Rule> r = make_shared<Rule>(*rule); in PopulateSuffixRule()
397 void PopulateExplicitRule(const Rule* rule) { in PopulateExplicitRule() argument
398 for (Symbol output : rule->outputs) { in PopulateExplicitRule()
402 rules_[output].AddRule(output, rule); in PopulateExplicitRule()
403 PopulateSuffixRule(rule, output); in PopulateExplicitRule()
407 static bool IsIgnorableImplicitRule(const Rule* rule) { in IsIgnorableImplicitRule() argument
410 if (rule->inputs.size() != 1) in IsIgnorableImplicitRule()
412 if (!rule->order_only_inputs.empty()) in IsIgnorableImplicitRule()
414 if (!rule->cmds.empty()) in IsIgnorableImplicitRule()
416 const string& i = rule->inputs[0].str(); in IsIgnorableImplicitRule()
421 void PopulateImplicitRule(const Rule* rule) { in PopulateImplicitRule() argument
422 for (Symbol output_pattern : rule->output_patterns) { in PopulateImplicitRule()
423 if (output_pattern.str() != "%" || !IsIgnorableImplicitRule(rule)) in PopulateImplicitRule()
424 implicit_rules_->Add(output_pattern.str(), rule); in PopulateImplicitRule()
443 bool CanPickImplicitRule(const Rule* rule, Symbol output, DepNode* n, in CanPickImplicitRule() argument
446 for (Symbol output_pattern : rule->output_patterns) { in CanPickImplicitRule()
450 for (Symbol input : rule->inputs) { in CanPickImplicitRule()
468 *out_rule = make_shared<Rule>(*rule); in CanPickImplicitRule()
472 for (Symbol output_pattern : rule->output_patterns) { in CanPickImplicitRule()