why is this recursion not working?
void evaluate_dep(char *target, Rule *rule) {
    Rule *r = find_rule(target, rule, 0);

    if (r == NULL) {
    }

    if (r != NULL) {
        Dependency *dep = r->dependencies;

        if (dep == NULL) {
            execute_action(r->actions);
        }

        if (dep != NULL) {
            struct stat t;

            if (stat(target, &t) != 0) {
                printf("f\n");
                execute_action(r->actions);
            } else {
                int res = 2;

                res = compare_time(r->target, dep->rule->target);

                printf("%d\n", res);
                if (res == 0) {
                    execute_action(r->actions);
                }
            }

            while (dep != NULL) {
                evaluate_dep(dep->rule->target, rule);

                struct stat t;

                if (stat(target, &t) != 0) {
                    printf("f\n");
                    execute_action(r->actions);

                } else {
                    int res = 2;

                    res = compare_time(r->target, dep->rule->target);

                    printf("%d\n", res);
                    if (res == 0) {
                        execute_action(r->actions);
                    }
                }

                dep = dep->next_dep;
            }
        }
    }
}