REDO(1) General Commands Manual REDO(1)

redorebuild targets

redo [-j -jobs] [-x] target ...

The redo utility rebuilds each given target. If no target is specified, the target all is used as argument.

The build process works by calling a ‘.do’ file (see redo-whichdo(1) to understand how it's searched) where the dependencies are declared with redo-ifchange(1) or redo-ifcreate(1). The ‘.do’ file is executed with the target name, the target name with one left extension trimmed, and a random file, respectively, as argument. If the ‘.do’ file is in the form “default..do” the amount of left trims from the second argument will follow the same pattern (see redo-whichdo(1)). The target will be atomically generated from the third argument file content, if any.

A ‘.do’ file is simply a script file, which the execution is expected to declare dependencies and/or build its target. The script can be written in any language by declaring a “shebang” (‘#!’) at the first line. If no “shebang” (‘#!’) is specified, the system shell “/bin/sh” will be used to execute the ‘.do’ file.

The sources and targets are described and differed in the following way:

SOURCE
A source is a file declared as a target dependency, but is not itself generated by any ‘.do’ file.
TARGET
A target is a file generated by a ‘.do’ file.

jobs
Set the maximum amount of ‘.do’ files that can run in parallel.
Define “/bin/sh -x” as fallback shell.

If jobs is ommited, it defaults to 1.

The redo utility exits 0 on success, and >0 if an error occurs.

redo-always(1), redo-ifchange(1), redo-ifcreate(1), redo-whichdo(1)

June 4, 2022 EltaninOS