]> Cypherpunks.ru repositories - goredo.git/blob - README
Fix JS deadlock and various optimizations
[goredo.git] / README
1 *goredo* redo implementation on pure Go
2
3 OVERVIEW                                               *goredo-overview*
4
5 This is pure Go implementation of DJB's redo (http://cr.yp.to/redo.html)
6 build system proposal. Originally it was just a rewrite of redo-c
7 (https://github.com/leahneukirchen/redo-c), but later most features of
8 apenwarr/redo (https://redo.readthedocs.io/en/latest/) were also
9 implemented. Why yet another implementation? It is feature full and has
10 better performance comparing to shell and Python implementation.
11 goredo is free software: see the file COPYING for copying conditions.
12
13 INSTALL                                                 *goredo-install*
14
15 Either: >
16     $ go get go.cypherpunks.ru/goredo
17     $ goredo -symlinks
18     $ export PATH=`pwd`:$PATH
19 or: >
20     $ git clone git://git.cypherpunks.ru/goredo.git
21     $ cd goredo
22     $ go build
23     $ ./goredo -symlinks
24     $ export PATH=`pwd`:$PATH
25 <
26 NOTES                                                     *goredo-notes*
27
28 * "all" target is used by default
29 * stdout is always captured, but no target is created if it was empty
30 * empty targets are considered always out of date
31 * .do's arguments are relative paths
32 * .do search goes up to / by default, but can be limited with either
33   REDO_TOP_DIR environment variable, or by having .redo/top file in it
34 * executable .do is run as is
35 * shebangless .do is run with /bin/sh -e[x]
36 * target's completion messages are written after they finish
37
38 FEATURES                                               *goredo-features*
39
40 * explicit check that stdout and $3 are not written simultaneously
41 * explicit check (similar to apenwarr/redo's one) that generated target
42   was not modified "externally" outside the redo, preventing its
43   overwriting, but continuing the build
44 * targets, dependency information and their directories are explicitly
45   synced (can be disabled, should work faster)
46 * file's change is detected by comparing its ctime and, if it differs,
47   its BLAKE2b hash. Hash checking is done to prevent false positives
48   (can be disabled, will work faster)
49 * files creation is umask-friendly (unlike mkstemp() used in redo-c)
50 * coloured messages (can be disabled)
51 * verbose debug messages, including out-of-date determination, PIDs,
52   lock acquirings/releases
53 * parallel build with jobs limit, optionally in infinite mode
54 * optional display of each target's execution time
55 * each target's stderr can be displayed with the PID
56 * target's stderr can be stored on the disk with TAI64N timestamp
57   prefixes for each line (you can use tai64nlocal utility from
58   daemontools (http://cr.yp.to/daemontools/tai64nlocal.html) to convert
59   them to local time). Captures can be viewed any time later
60
61 COMMANDS                                               *goredo-commands*
62
63 * redo-ifchange, redo-ifcreate, redo-always (useful with redo-stamp)
64 * redo -- same as redo-ifchange, but forcefully and *sequentially* run
65   specified targets
66 * redo-log -- display TAI64N timestamped last stderr of the target
67 * redo-stamp -- record stamp dependency and consider it non out-of-date
68   if stamp equals to the previous one
69 * redo-cleanup -- removes either temporary, or log files, or
70   everything related to goredo
71 * redo-whichdo -- .do search paths for specified target (similar to
72   apenwarr/redo): >
73     $ redo-whichdo x/y/a.b.o
74     x/y/a.b.o.do
75     x/y/default.b.o.do
76     x/y/default.o.do
77     x/y/default.do
78     x/default.b.o.do
79     x/default.o.do
80     x/default.do
81     default.b.o.do
82     default.o.do
83     default.do
84     ../default.b.o.do
85     ../default.o.do
86 <
87 STATE                                                     *goredo-state*
88
89 Dependency and build state is kept inside .redo subdirectory in each
90 directory touched related the build. Each corresponding target has its
91 own, recreated with every rebuild, .dep file. It is recfile
92 (https://www.gnu.org/software/recutils/), that could have various
93 dependency information (dep.rec with the schema included): >
94
95     Build: 80143f04-bfff-4673-950c-081d712f573d
96
97     Type: ifcreate
98     Target: foo.o.do
99
100     Type: ifchange
101     Target: default.o.do
102     Ctime: 1605721341.253305000
103     Hash: f4929732f96f11e6d4ebe94536b5edef426d00ed0146853e37a87f4295e18eda
104
105     Type: always
106
107     Type: stamp
108     Hash: 5bbdf635932cb16b9127e69b6f3872577efed338f0a4ab6f2c7ca3df6ce50cc9
109 <
110 LICENCE~
111
112 This program is free software: you can redistribute it and/or modify
113 it under the terms of the GNU General Public License as published by
114 the Free Software Foundation, version 3 of the License.
115
116 This program is distributed in the hope that it will be useful,
117 but WITHOUT ANY WARRANTY; without even the implied warranty of
118 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
119 GNU General Public License for more details.
120
121  vim: filetype=help