C Sample SMake to simulate as C make Program

Download Solution: Click to Download Solution
Solution File Name: CSampleSMakesimulateCmakeProgram.docx
Unzip Password: prestobear.com

Problem:
Write a C Console application S_MAKE that implements a MAKE-like utility (similar to the old-style
Microsoft MAKE utility).

S_MAKE is invoked by specifying a Script filename on the command line:
S_MAKE project-script-filename

If no script filename is given, default to a file named “PROJECT” (no filename extension).
The project script file is a text file that specifies a collection of targets (and their dependencies), and a
list of commands to be executed to re-make those targets. In particular,

Target-Dependent Line (freeformat, on the same line, possibly whitespace between items):
• begins in column one, with the target filename.
• Following the target name (possible whitespace) is a required colon (:) and a (optional) list of
filenames on which the target is dependent.

Command Lines:
• Immediately follow a target line.
• Begin with at least one white-space character.
• Specify a program command line to be executed. The command must be the name of an
executable file to be run using the CreateProcess syscall.
• A target-line can be followed by several command lines.
• A blank line (or end of file) indicates the end of the sequence of command lines.

Blank Lines or Comment Lines (line with # in column one):
• Can appear before new target-lines, or after the last command line for a target.
Note that blank line(s) may be present even before the first target line.


1.smake.c
#include < ctype.h >
#include < stdio.h >
#include < windows.h >
#include < winbase.h >
#include < stdio.h >
#include < stdlib.h >

//------------------------------------------------------------------------
int main(int argc, char *argv[]) {

}

//------------------------------------------------------------------------
BOOL TarLineChecker(char *buffer, char *filename) {

}

[embeddoc url=”https://prestobear.com/wp-content/uploads/2018/05/SMAKEScreenshot.pdf” download=”none”]

Add Comment