Organisation: | Copyright (C) 2021-2024 Olivier Boudeville |
---|---|
Contact: | about (dash) howtos (at) esperide (dot) com |
Creation date: | Saturday, November 20, 2021 |
Lastly updated: | Thursday, January 4, 2024 |
A build tool allows to automate all kinds of tasks, by applying rules and tracking dependencies: not only compiling, linking, etc. applications, but also checking them, generating their documentation, running and debugging them, etc.
Often build tools are tied to some programming languages (e.g. Maven for Java, Rebar3 for Erlang, etc.).
Some tools are more generic by nature, like late GNU autotools, or Cmake, GNU make, etc.
For most uses, our personal preference goes to the latter. Notably all our Erlang-based developments, starting from Ceylan-Myriad, are based on GNU make.
We recommend the reading of this essential source for reference purpose, notably the section about The Two Flavors of Variables.
Taking our Erlang developments as an example, their base, first layer, Ceylan-Myriad, relies on build facilities that are designed to be also reused and further adapted / specialised / parametrised in turn by all layers above in the stack (e.g. Ceylan-WOOPER).
For that, Myriad defines three top-level makefiles:
Each layer references its specialisation of these three elements (and the ones of all layers below) in its own GNUmakesettings.inc file, which is the only element that each per-directory GNUmakefile file will have to include.
Such a system allows defining (build-time and runtime) settings and rules once for all, while remaining flexible and enabling individual makefiles to be minimalistic: beside said include, they just have to list which of their subdirectories the build should traverse (thanks to the MODULES_DIRS variable, see example).
asdf, an extendable version manager for various languages (Ruby, Node.js, Elixir, Erlang, etc.).
One may refer to the development section of Ceylan-Hull, or go back to the Ceylan-HOWTOs main page.