From d92b741fce84b6da7cc329495903847e8e644a46 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jun 1993 22:40:50 +0000 Subject: Formerly rule.c.~14~ --- rule.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/rule.c b/rule.c index 5e2d190..ea3031a 100644 --- a/rule.c +++ b/rule.c @@ -37,6 +37,10 @@ struct rule *last_pattern_rule; unsigned int num_pattern_rules; +/* Maximum number of target patterns of any pattern rule. */ + +unsigned int max_pattern_targets; + /* Maximum number of dependencies of any pattern rule. */ unsigned int max_pattern_deps; @@ -66,8 +70,9 @@ count_implicit_rule_limits () unsigned int namelen; register struct rule *rule, *lastrule; - num_pattern_rules = 0; - + num_pattern_rules = max_pattern_targets = max_pattern_deps = 0; + max_pattern_dep_length = 0; + name = 0; namelen = 0; rule = pattern_rules; @@ -77,9 +82,17 @@ count_implicit_rule_limits () unsigned int ndeps = 0; register struct dep *dep; struct rule *next = rule->next; - + unsigned int ntargets; + ++num_pattern_rules; + ntargets = 0; + while (rule->targets[ntargets] != 0) + ++ntargets; + + if (ntargets > max_pattern_targets) + max_pattern_targets = ntargets; + for (dep = rule->deps; dep != 0; dep = dep->next) { unsigned int len = strlen (dep->name); -- cgit v1.2.3