The project is for class CMSC216 Introduction to Computer Systems.
Assignment Due Date: Apr 21, 2022
Assignment Score: 81 out of 100
The language used: C
Assignment Purpose: Write a version of make, which can build programs and, more generally, execute any commands that depend on other things. Write utility functions to perform various operations on fakefiles, such as reading a fakefile, printing the components of a fakefile that has been read, looking up targets in a fakefile, performing actions in a fakefile, etc.
Functions implemented:
- int exists(const char filename[])
- int is_older(const char filename1[], const char filename2[])
- Fakefile *read_fakefile(const char filename[])
- int lookup_target(Fakefile *const fakefile, const char target_name[])
- void print_action(Fakefile *const fakefile, int rule_num)
- void print_fakefile(Fakefile *const fakefile)
- int num_dependencies(Fakefile *const fakefile, int rule_num)
- char *get_dependency(Fakefile *const fakefile, int rule_num, int dependency_num)
- int do_action(Fakefile *const fakefile, int rule_num)
- void clear_fakefile(Fakefile **const fakefile)
For my implementation, click here. Contact me if you cannot access it.
Click here for the detailed project description