Documentation - Featureless Make
Author: Kevin Day
Description: Featureless Make program documentation.
Keywords: Kevin Day, Kevux, FLL, Featureless, Linux, Library, Make, Fake, Open-Source

# Featureless Make Documentation

The fake program, also called Featureless Make is the flagship program of the FLL project and provides the ability to compile source code and perform various actions not unlike how the GNU Make program operates.

This tools is directly intended to be a replacement to the GNU Make program but not as a replacement for all of the GNU Make functionality.
Instead, the fake program follows the ideology that a build program should not involve itself with system-specific behavior, such as installing to a system.

Despite this non-standard ideology, the fake program is flexible enough to be used as an installer.
In fact, this tool is used to not only build the entire FLL but it can also compile and run unit tests for the project.

A bootstrap script is provided in all FLL projects that operates with almost complete one-to-one functionality to this tool to allow for the system to build itself.
A great example of this is the test script used to run unit tests on services like Github where this project must compile itself and then use itself to run unit tests against itself.

While most of the programs provided with the FLL are young and not well tested, the fake program is considered mature.

There are two primary operations in which this tool executes:

1. The build operation.
2. The make operation.

The build mode is derived from the idea that most of the compilation process is redundant and can be simplified to a pre-define set of configuration settings.
This reduces the amount of efforted needed to write and mainting a build system at the cost of flexibility.

The make mode is the mode for operating as a replacement to the GNU Make program.
This provides scriptable ways to perform just about any task needed when building a system.
Many of the build mode settings are available (but are not required) and this mode can even call the build mode itself.

## Standard Parameters

Short | Long | Description
--- | --- | ---
`-h` | `--help` | Print the help message.
`+C` | `++copyright` | Print the copyright.
`+d` | `++dark` | Output using colors that show up better on dark backgrounds.
`+l` | `++light` | Output using colors that show up better on light backgrounds.
`+n` | `++no_color` | Do not print using color.
`+Q` | `++quiet` | Decrease verbosity, silencing most output.
`+E` | `++error` | Decrease verbosity, using only error output.
`+N` | `++normal` | Set verbosity to normal.
`+V` | `++verbose` | Increase verbosity beyond normal output.
`+D` | `++debug` | Enable debugging, significantly increasing verbosity beyond normal output.
`+v` | `++version` | Print only the version number.

The `+Q/++quiet` parameter silences all output that is not the intent and purpose of the program.
For example, the purpose of the utf8 program is to print the Unicode code point or the UTF-8 byte code.
The `+Q/++quiet` will not suppress this output.
The new line printed at the end of the program, is however, not printed.
The `+Q/++quiet` is ideal for using in scripting to help guarantee more consistent and controlled output.

The `+N/++no_color` simplifies the output to avoid the special color character codes.
The special color character codes tend to take up a lot of extra space and may slow down printing performance.

## Program Parameters

Short | Long | Description
--- | --- | ---
`-d` | `--define` | Append an additional define after defines from settings file.
`-f` | `--fakefile` | Use this fakefile.
`-m` | `--mode` | Use this mode when processing the build settings.
`-p` | `--process` | Process name for storing build states.
`-s` | `--settings` | Use this settings file.
`-b` | `--build` | Specify a custom build directory.
`-D` | `--data` | Specify a custom path to the data files.
`-S` | `--sources` | Specify a custom path to the source files.
`-w` | `--work` | Use includes/libraries/programs from this directory instead of system.
`` | `--disable-doc` | Forcibly do not build documents files.
`` | `--enable-doc` | Forcibly do build documents files.
`` | `--disable-shared` | Forcibly do not build shared files.
`` | `--enable-shared` | Forcibly do build shared files.
`` | `--disable-static` | Forcibly do not build static files.
`` | `--enable-static` | Forcibly do build static files.

When using the `-d/--define` parameter the define structure must be passed as-is and may even need to be quoted if there is whitespace.

For example, in the C programming, passing a macro to the compiler might look like '`-DMY_MACRO=1`'.
To do this using `-d/--define`, there would be two parameters passed like this: '`-d -DMY_MACRO=1`'.
This works because the parameter after the `-d/--define` is not interpreted and is treated exactly as is without interpreting it as a parameter to the fake program.

Because of this, passing '`-d -h`' would not print the program help because the '`-h`' is considered a value associated with the '`-d`' parameter rather than a parameter itself.

## Operations

Operation | Description
--- | ---
`build` | Build or compile the code based on build settings file.
`clean` | Delete all build files.
`make` | Build or compile the code based on fakefile (default).
`skeleton` | Build a skeleton directory structure.

When performing the build operation, the `--mode` parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.

For example, when a mode of '`fll_monolithic`' is specified, build libraries from both '`build_libraries`' and '`build_libraries-fll_monolithic`' are used (but not '`build_libraries-fll_level`').

When specifying the `fakefile` or the settings parameters, the project root is seached first and then the build data director is searched when the given file does not contain a directory separator.

For example, with '`--fakefile my_fakefile`' the fakefile at '`./my_fakefile`' is used if found, but if it is not found then '`./data/build/my_fakefile`' is used if found.

For example, with '`--fakefile ./my_fakefile`' the fakefile at '`./my_fakefile`' is used if found, but if it is not found then no other paths are attempted.

When piping data to this program, the piped data is treated as a `fakefile`.

Only the make operation is supported when using piped data.