Check if the rule already exits.
Dependency *curr_dep = curr_rule->dependencies;
token = strtok(NULL, " :\t\n");
while (token != NULL) {
Dependency *dep = malloc(sizeof(Dependency));

// Check if the rule already exits.
Rule *dep_rule = head_rule;
while (dep_rule != NULL) {
    if (strcmp(dep_rule->target, token) == 0) { // If exits, link that rule to the dependency.
        dep->rule = dep_rule;
        break;
    }
    dep_rule = dep_rule->next_rule;
}