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.17.0.6

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:

  • --R or --rules display available rules, the same as executing the show-rules target

  • --V or --variables display available variables (and what they are set to), the same as executing the show-variables target

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🔗ℹ

  • all — execute: install, setup & test

  • compile — compile the PWD directory (which is (current-directory) unless overwritten)

  • run — run the ENTRYPOINT

  • install — install the package

3.4.2 Documentation🔗ℹ

  • docs-dir — create the doc directory

  • docs-html — generate HTML documentation

  • docs-latex — generate LaTex documentation

  • docs-markdown — generate Markdown documentation

  • docs-text — generate documentation in pure text format

  • docs — execute: docs-html, docs-latex, docs-markdown & docs-text

3.4.3 Distribution🔗ℹ

  • exe — create a executable in "bin" directory, from ENTRYPOINT

  • pkg — create a source package

3.4.4 Removal🔗ℹ

  • distclean — remove pkg zip (generated by pkg target) & binary executable

  • clean — execute: disclean & remove all compiled and doc directories

  • remove — uninstall the package

  • purge — execute: remove & clean

  • reinstall — remove and install the package again

  • resetup — execute: reinstall & setup

3.4.5 Tests🔗ℹ

  • setup — run raco setup

  • check-deps — check package dependencies

  • test-local — test locally (without installing the package)

  • test — test installed package

3.4.6 Everything🔗ℹ

  • show-rules — display available rules

  • show-variables — display available variables (and what they are set to)

  • show — execute both show-rules & show-variables

  • everything-test — execute: clean, compile, install, setup, check-deps, test, purge

  • everything-dist — execute: pkg & exe