Skip to content

The distribution scripts

The platform matrix is the set of dist/*.u scripts present.

A package that builds the same way everywhere should use a single dist/any.u.

A package that needs custom build logic per platform should use one per ABI:

dist/Darwin_arm64.u
dist/Darwin_x86_64.u
dist/Linux_arm64.u
dist/Linux_x86.u
dist/Linux_x86_64.u
dist/Windows_arm64.u
dist/Windows_x86.u
dist/Windows_x86_64.u

Each dist/<ABI>.u (or dist/any.u) is a unified script: ordinary Markdoc with the value shell commands that build the package.

The Markdoc is the package's build documentation.

The section headings in a distribution script can be anything you want.

The value shell commands, however, are executed in order. Each value shell command starts with two spaces and then a $. Two spaces and a > continue an existing value shell command:

## GNU Awk
Let's check the file type of our CommonsBase_GNU.Awk@5.3.1 module:
$ run-object CommonsBase_FileMagic.File@7.8.50407 -s Release.execution_abi -m ./bin/file.exe -e bin/file.exe --
> -b $(get-object CommonsBase_GNU.Awk@5.3.1 -s Release.target_abi -d : -e file.exe)/bin/awk.exe
\test(pass)
\dk.target(abi: "Windows_x86")[PE32 executable for MS Windows 6.00 (console),, 13 sections
]\;

The documentation for value shell commands can be found in the Specification.