Build system including fast embedded scripting language
Go to file
2023-05-08 14:10:52 -04:00
src fix formatting 2023-05-08 14:10:52 -04:00
README add README 2023-05-04 11:34:37 -04:00

+ emk

A build system, including a fast embedded scripting language.

+ Installation

Run 'make', followed by 'make install'

+ How it works

The first task to run is parsing and preprocessing, where emk will parse an emkfile
in the current working directory, include config.emk, and store variables in memory.

emk will then run the modified emkfile through the interpreter.

+ How to write an emkfile

emk has a small collection of reserved words:
- include: instruct the preprocessor to include a file
- declare: declare a variable
- function: define a function (eg. build, install, etc)
- if, then, else, while, for, do
- echo: write to stdout

An example of a good emkfile is shown below:

	include ./config.emk;

	declare PROGVER = "1.0";

	function build {
		echo "this function builds the program\n";
	}

	function install {
		echo "this function installs the program\n";
	}

Lines must end with either semicolons (;) or braces ({})
Variables can be called by prefixing '$' to the variable name. Ex:

	declare MSG = "hi\n";

	function build {
		echo "$MSG";
	}