fixed print
This commit is contained in:
parent
1efc35a59e
commit
4b3df88e8a
1 changed files with 10 additions and 2 deletions
|
|
@ -488,6 +488,8 @@ static int run_rule(struct rule *rule)
|
|||
dependencies->data);
|
||||
}
|
||||
}
|
||||
|
||||
dependencies = dependencies->next;
|
||||
}
|
||||
|
||||
while (commands != NULL)
|
||||
|
|
@ -550,9 +552,15 @@ int make(char *path, struct list *rules, char *exec_name, int flags)
|
|||
|
||||
make_parse(path);
|
||||
|
||||
// Print
|
||||
if (flags & FLAGS_PRINT)
|
||||
{
|
||||
dump_database();
|
||||
free_all();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Run
|
||||
int status = make_run(rules);
|
||||
free_all();
|
||||
return status;
|
||||
|
|
@ -590,7 +598,7 @@ void dump_database(void)
|
|||
|
||||
// Print
|
||||
char *key = elt->data;
|
||||
printf("%s = %s\n", key, val);
|
||||
printf("'%s' = '%s'\n", key, val);
|
||||
|
||||
elt = elt->next;
|
||||
}
|
||||
|
|
@ -605,7 +613,7 @@ void dump_database(void)
|
|||
drop(GENERIC_ERR, "Could not get rule '%s' in database", elt->data);
|
||||
|
||||
// Print name
|
||||
printf("(%s) :", rule->name);
|
||||
printf("(%s):", rule->name);
|
||||
|
||||
// Print dependencies
|
||||
struct list *dep = rule->dependencies;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue