Starting from:

$35

Project #3 537make command Solution

## Description

The 537make command will look first for a file called "makefile"; if that is found, then it will take that file and build and run it's specifications. If it does not find "makefile", then it will look for a file called "Makefile". If neither file is found, then it will report an error and exit.




## Included Files

main.c

This is the main routine of the program. In this file the main function is invoked which creates all three queues. Each of the four threads is then created and run to completion before the main function continues. After this the main function prints out the

queue stats for each StringQueue.




text_parsing.c

This file parses the specified file and converts each string into a 3D array segmented into block, lines, and words.




text_parsing.h

This is the header file for text_parsing.c that contains the method arguments.




build_spec_repr.c

This file takes the 3D array and places each target into a Node structure along with it's corresponding dependencies and commands. It then returns an array of these Nodes.




build_spec_repr.h

This is the header file for build_spec_repr.c that contains the method arguments and the Node structure initialization.




build_spec_graph.c

This file connects each node to all of it's dependencies and then traverses the newly formed graph to build the necessary specifications.




build_spec_graph.h

This is the header file for build_spec_graph.c that contains the method arguments.




proc_creation_prog_exec.c

This file takes a command and a 2D array of argument strings and executes that command and waits for it to return.




proc_creation_prog_exec.h

This is the header file for proc_creation_prog_exec.c that contains the method arguments.




Makefile

This file, invoked with the command 'make' or also the command '537make', compiles all the preceding files into one executable named '537make'.




## Usage

The program can be run simply by typing:

% 537make

In this case, it will make the first build specification found in the file.




Alternatively, you can input a target name from the specified file for example:

% 537make readproc.o

In this case, it will make the build specification labeled "readproc.o".

More products