PROPHET/OS
NAME
build: runs the steps of a build list from the top
SYNOPSIS
build [-v] <list>
DESCRIPTION
Runs the steps of a build list from the top. A step runs when its target is missing, when an input is newer or missing, or when an input was made earlier in the same run; every other step is up to date and skipped. The first command that fails stops the list, and build names the step and the command. A step that fails after one of its commands ran leaves no target, so the next run builds it again.
With -v every command is named before it runs.
The room for a line and its words is measured from the list, so no line is too long.
Exit 0 when every step holds, 1 when a step failed, 2 when the list cannot be read.
The list
The host writes it out of the Makefile with cc/tools/build/buildlist.py, as build/selfbuild.list: the kernel and every program, one step per target, with the inputs make sees and the commands it would run. The format stands at the head of that tool. A run line is started as a program by its first word; a dir line is made here, like mkdir -p. A shell line needs a shell, and this machine has none, so a stale step with one fails and says so.
EXAMPLE
$ build --help build [-v] <list> runs the steps of a build list, skips what is up to date -v names every command before it runs 0 when every step holds, 1 when a step failed, 2 when the list cannot be read