fixed print

This commit is contained in:
Gu://em_ 2025-10-31 22:48:30 +01:00
parent 1efc35a59e
commit 4b3df88e8a

View file

@ -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;