/537-proj3

"537Make", CS 537 Programming Assignment 3 (Fall 2020). A clone of the `make` utility.

Primary LanguageCMIT LicenseMIT

CS 537 Programming Assignment 3 (Fall 2020)
Michael Noguera (noguera@cs.wisc.edu) and Julien de Castelnau (de-castelnau@cs.wisc.edu)
due Nov 5 at 12:30pm

== BUILDING ==

To build, run "make" at the root of this directory. If you specify the DEBUG environment
variable as "true" or use "make DEBUG=true", debug symbols will be included in the 
executable as well. You can also run the scan-build target to build with the Clang static
analyzer, and scan-view to view the generated output in a web browser.

Use "make clean" to get rid of object files and executables.

== USAGE ==
Valid usages are:
 - `./537make`
 - `./537make TARGET`
 - `./537make -f MAKEFILE`
 - `./537make -f MAKEFILE TARGET`

I/O redirection is supported.

== PROJECT STRUCTURE: MODULES ==
 - main: (of course), gets arguments and sorchestrates program operation

 - makefileparser: macro-scale makefile parser, given a file pointer outputs a
   directed graph of rules
   uses pthreads to read, process, and output in a synchronized fashion

 - makefilerule: interprets individual rules' commands, and handles I/O detection

 - graph: DAG (errors upon cycle detection), specifically constructed to hold
   makefile Rules. Topological sorting is handled here.

 - exec: forks and runs each process as detailed by topologically ordered list.

 - VARIOUS ADTs: void*s make these fully generic:
    - linkedlist: linkedlist of void*s
    - queue: thread-safe circular buffer of void*s (used for synchronization in
      makefileparser)
    - bintree: binary tree implementation with string keys and void* values