-
Notifications
You must be signed in to change notification settings - Fork 0
/
redo.1
69 lines (65 loc) · 1.55 KB
/
redo.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.TH REDO 1
.SH NAME
redo, redo-ifchange, redo-ifcreate \- rebuild target files when source files have changed.
.SH SYNOPSIS
.B redo
target.ext ...
.PP
.B redo-ifchange
file ...
.PP
.B redo-ifcreate
file ...
.PP
.B stop-ifchange
file ...
.PP
.SH DESCRIPTION
.I redo
runs an executable named
.I target.ext.do
or
.IR default.ext.do ,
to rebuild
.IR target.ext ,
atomically, like:
.PP
.EX
set -e
./target.ext.do target.ext ext target.ext---alt-redoing > target.ext---redoing
fsync target.ext---redoing
mv target.ext---redoing target.ext
.EE
.PP
(If your
.I .do
executable outputs a directory, you can use the temporary path passed as argument
.BR $3 .
It's an error to write to both
.B $3
and stdout.)
After executing it, redo automatically records the
.I .do
executable as a dependency of
.I target.ext
in
.IR target.ext.prereqs .
.PP
.I redo-ifchanage
can be called from within a
.I .do
executable to record and rebuild additional dependencies.
If an argument to redo-ifchange is a target that can be rebuilt by redo,
redo-ifchange will rebuild it if its dependencies have changed since the last run.
If an argument to redo-ifchange is a source file,
redo-ifchange simply records that the file is a dependency of the target build by the
.I .do
executable it is called from.
.I redo-ifcreate
can be called from within
.I .do
executables to record that the build depends on the non-existence of the declared files.
.I stop-ifchange
can be called from within
.I .do
executables to record that the build should be aborted if the declared files have been changed since the last build.