mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-27 06:27:57 +00:00
Formerly rule.c.~16~
This commit is contained in:
parent
a8c24526e3
commit
7c456a7368
1 changed files with 29 additions and 21 deletions
40
rule.c
40
rule.c
|
@ -503,22 +503,13 @@ create_pattern_rule (targets, target_percents,
|
|||
|
||||
/* Print the data base of rules. */
|
||||
|
||||
void
|
||||
print_rule_data_base ()
|
||||
static void /* Useful to call from gdb. */
|
||||
print_rule (r)
|
||||
struct rule *r;
|
||||
{
|
||||
register unsigned int rules, terminal;
|
||||
register struct rule *r;
|
||||
register struct dep *d;
|
||||
register unsigned int i;
|
||||
register struct dep *d;
|
||||
|
||||
puts ("\n# Implicit Rules");
|
||||
|
||||
rules = terminal = 0;
|
||||
for (r = pattern_rules; r != 0; r = r->next)
|
||||
{
|
||||
++rules;
|
||||
|
||||
putchar ('\n');
|
||||
for (i = 0; r->targets[i] != 0; ++i)
|
||||
{
|
||||
fputs (r->targets[i], stdout);
|
||||
|
@ -528,10 +519,7 @@ print_rule_data_base ()
|
|||
putchar (':');
|
||||
}
|
||||
if (r->terminal)
|
||||
{
|
||||
++terminal;
|
||||
putchar (':');
|
||||
}
|
||||
|
||||
for (d = r->deps; d != 0; d = d->next)
|
||||
printf (" %s", dep_name (d));
|
||||
|
@ -541,6 +529,26 @@ print_rule_data_base ()
|
|||
print_commands (r->cmds);
|
||||
}
|
||||
|
||||
void
|
||||
print_rule_data_base ()
|
||||
{
|
||||
register unsigned int rules, terminal;
|
||||
register struct rule *r;
|
||||
|
||||
puts ("\n# Implicit Rules");
|
||||
|
||||
rules = terminal = 0;
|
||||
for (r = pattern_rules; r != 0; r = r->next)
|
||||
{
|
||||
++rules;
|
||||
|
||||
putchar ('\n');
|
||||
print_rule (r);
|
||||
|
||||
if (r->terminal)
|
||||
++terminal;
|
||||
}
|
||||
|
||||
if (rules == 0)
|
||||
puts ("\n# No implicit rules.");
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue