|BUILD(1)||General Commands Manual||BUILD(1)|
buildis a program which follows simple build instructions embedded in source files. The number of
-dflags control the printing of debugging information. The
-fflag disables modification time checks, forcing the build process. The
-qflag disables the printing of executed commands.
build is decidedly not a
make(1) replacement, except in trivial cases. In such
cases, however, it is a nice and simple solution. The program is originally
designed for generating troff(1) documents, but can be
used with arbitrary source files.
- command line (one or more)
- [anything] <whitespace> "$ " <shell command>
- dependency line (only one)
- [anything] <whitespace> "% " <files separated by whitespace>
Within each command line,
for a target:
- ">" <filename without whitespace>
" -o " <filename without whitespace>
The last target found will be counted as the real target for the build process. If no target is found, the commands will always be executed, regardless of modification times.
buildexecutes all command lines, joined by newlines, in the same shell process. This means that you can keep state across multiple commands. Note that all commands are executed regardless of the exit status of previous commands.
If a command fails,
build exits with a
positive status and aborts the build process.
/** * To build this program, use the following invocation: * $ cc -O2 -o prg prg.c */
$ build prg.c
will build prg, if it is older than prg.c.
Assuming that the file doc.t starts with the following text,
.\" This document is built with the following shell commands: .\" $ export LC_ALL=en_US.UTF-8 .\" $ refer -p refs doc.t | troff -ms | dpost > doc.ps .\" $ ps2pdf doc.ps > doc.pdf .\" $ rm doc.ps . .\" Apart from this file, it depends on the following files: .\" % refs x.tmac
$ build doc.t
will build doc.pdf, depending on the relative modification times of doc.pdf, doc.t and x.tmac.
buildis written by John Ankarström <john (at) ankarstrom.se>.
|December 8, 2021||NetBSD 9.1|