On this page:
3.1 Options
3.2 Variables
3.3 Rules
3.4 Available rules
3.4.1 Main
3.4.2 Documentation
3.4.3 Distribution
3.4.4 Removal
3.4.5 Tests
3.4.6 Everything
8.12

3 Command-line interface🔗ℹ

3.1 Options🔗ℹ

Options must come before variables and targets, so they can not be overwritten by setting any variables. They can only be overwritten by executing mike with wanted variables exported to system environment beforehand.

mike command accepts the following command-line flags:

3.2 Variables🔗ℹ

Variables are used to control how rules execute, for example a rule can contain a variable EXE_FLAGS which determines command-line arguments passed to raco in order to produce a binary executable.

Any initial variable can be overwritten by changing (exporting) the system environment variables (ie.: export ASD=fgh) or passing the variables as one of the arguments (after options).

Variables overwriting passed as arguments have precedence over environment variables. In fact when overwriting using the environment variable route the exported variables become initial variables.

Example: overwriting with environment

  export PACKAGE_NAME=asd
  mike exe

or

  PACKAGE_NAME=asd mike exe

Example: overwriting with arguments

  mike PACKAGE_NAME=asd exe

3.3 Rules🔗ℹ

Rules are the functions that define how targets are handled. Target is a command-line argument that triggers a rule execution.

For developers: The rules can also be checked by entering into the "rules.rkt" module and executing (hash-keys rules).

Rules are first gathered and checked if they exist, if they do they are executed in the order specified on the command-line, if they do not exist an exception is raised and the program terminates. Because of this it is impossible to have one target executed with one value of variable and the other with a different value.

Example: PACKAGE_NAME will be "fgh"

  mike PACKAGE_NAME=asd show-variables PACKAGE_NAME=fgh

3.4 Available rules🔗ℹ

3.4.1 Main🔗ℹ
3.4.2 Documentation🔗ℹ
3.4.3 Distribution🔗ℹ
3.4.4 Removal🔗ℹ
3.4.5 Tests🔗ℹ
3.4.6 Everything🔗ℹ