/bin/sh -e
script.
If redo
is run with an -x argument, then
/bin/sh -ex
is used instead.
dir/base.a.b.do dir/default.a.b.do dir/default.b.do dir/default.do default.a.b.do default.b.do default.do
and for ../a/b/xtarget.y target:
./../a/b/xtarget.y.do ./../a/b/default.y.do ./../a/b/default.do ./../a/default.y.do ./../a/default.do ./../default.y.do ./../default.do
$REDO_TOP_DIR
environment variable, or by
having .redo/top file in it.
$1
– name of the target.
$2
– base name of the target. Equals to $1
if
it is not default.* file. Otherwise it lacks the extension.
a.b.c.do -> $2=a.b.c default.do -> $2=a.b.c default.c.do -> $2=a.b default.b.c.do -> $2=a
$3
– path to the temporary file, that will be renamed
to the target itself. It is relative to the file in the target
directory.
stdout
is captured and written to the
$3
file. You have to produce either stdout
output, or
use $3
directly, but not both.
stdout
output nor $3
file were
explicitly created, then no output file is created at all.
Target does not produce anything, it is "non-existent".
stderr
is not captured at all and can be seen by default.
redo-ifchange
command invocation. It takes list of dependencies (targets), on
whose the currently build target is dependant. Current .do
file is implicitly added as a dependency.
redo-ifchange
’s dependency target exists, then it
is build (according to build rules in corresponding .do). If
dependency has not been changed, then it is not rebuilt.
redo-ifcreate
command. If specified dependency target file
appears, then current target will be rebuilt. Intermediate higher
priority .do files dependency is implicitly recorded. For
example, if you foo target currently uses default.do
script, then foo.do is automatically recorded as a
non-existent dependency, forcing foo to be rebuilt if
foo.do appears.