Lines Matching refs:rule
234 struct rule **tryrules in pattern_search()
235 = (struct rule **) xmalloc (num_pattern_rules * max_pattern_targets in pattern_search()
236 * sizeof (struct rule *)); in pattern_search()
262 struct rule *rule; in pattern_search() local
308 for (rule = pattern_rules; rule != 0; rule = rule->next) in pattern_search()
312 if (rule->deps != 0 && rule->cmds == 0) in pattern_search()
317 if (rule->in_use) in pattern_search()
323 for (i = 0; rule->targets[i] != 0; ++i) in pattern_search()
325 char *target = rule->targets[i]; in pattern_search()
326 char *suffix = rule->suffixes[i]; in pattern_search()
332 if (recursions > 0 && target[1] == '\0' && !rule->terminal) in pattern_search()
335 if (rule->lens[i] > namelen) in pattern_search()
342 stemlen = namelen - rule->lens[i] + 1; in pattern_search()
401 if (rule->deps == 0 && rule->cmds == 0) in pattern_search()
407 tryrules[nrules] = rule; in pattern_search()
446 rule = tryrules[i]; in pattern_search()
452 if (rule == 0) in pattern_search()
457 if (intermed_ok && rule->terminal) in pattern_search()
462 rule->in_use = 1; in pattern_search()
467 + (rule->suffixes[matches[i]] - rule->targets[matches[i]]) - 1; in pattern_search()
468 stemlen = namelen - rule->lens[matches[i]] + 1; in pattern_search()
488 for (dep = rule->deps; dep != 0; dep = dep->next) in pattern_search()
764 rule->in_use = 0; in pattern_search()
784 rule = 0; in pattern_search()
789 if (rule == 0) in pattern_search()
799 file->name = rule->targets[matches[foundrule]]; in pattern_search()
932 file->cmds = rule->cmds; in pattern_search()
937 struct file *f = lookup_file (rule->targets[matches[foundrule]]); in pattern_search()
945 if (rule->targets[1] != 0) in pattern_search()
946 for (i = 0; rule->targets[i] != 0; ++i) in pattern_search()
953 new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1); in pattern_search()
954 bcopy (rule->targets[i], p, in pattern_search()
955 rule->suffixes[i] - rule->targets[i] - 1); in pattern_search()
956 p += rule->suffixes[i] - rule->targets[i] - 1; in pattern_search()
959 bcopy (rule->suffixes[i], p, in pattern_search()
960 rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1); in pattern_search()
965 f = lookup_file (rule->targets[i]); in pattern_search()
981 return rule != 0; in pattern_search()