make rules nodes like a make file, check if the rule node already exists, if it doesnt don't add a new one. If it doesnt create a new rule node and add to the end of the linked list
/* Read from the open file fp, and create the linked data structure
   that represents the Makefile contained in the file.
   See the top of pmake.h for the specification of Makefile contents.
 */
Rule *parse_file(FILE *fp) {
   
    //Initialize variables
    char line[MAXLINE];
    Rule *head = NULL;
    Rule *r;
    // Dependency *dep;
    // Action *a;

    // Read the first line

    while(fgets(line, MAXLINE, fp) != NULL){

        line[MAXLINE - 1] = '\0';

        int i = MAXLINE - 1; 
        while(isspace(line[i]) != 0){
            line[i] = '\0';
            i --;
        }

        if(is_comment_or_empty(line) != 1){
            // printf("%s\n", line[0]);

            char *token;
            token = strtok(line, " ");

            while(token != NULL){
                if((isspace(token[0]) == 0 )&& (strcmp(token, ":") != 0) && (token[0] != '\t')){
                    Rule *r = NULL;
                    Rule *curr2 = head;
                    // Check if rule already exists
                    while(curr2 != NULL){
                        printf("%s\n", curr2->target);
                        if(strcmp(curr2->target, token) == 0){
                            r = curr2;
                            break;
                        }
                        curr2 = curr2->next_rule;
                    }

                    // Rule doesn't exists
                    if(r == NULL){
                        r = malloc(sizeof(Rule));
                        r->target = strdup(token);
                        r->actions = NULL;
                        r->dependencies = NULL;
                        r->next_rule = NULL;
                    }
                
                    // Now append to head
                    if(head == NULL){
                        head = r;
                    }else{
                        Rule *curr = head;
                        while(curr-> next_rule!= NULL){
                            curr = curr->next_rule;
                        }
                        curr->next_rule = r;
                    } 
                }
                token = strtok(NULL, " ");
            }
            
        }
    }
    return head; 
}