]> Cypherpunks.ru repositories - goredo.git/blob - doc/jobserver.texi
Download link for 2.6.2 release
[goredo.git] / doc / jobserver.texi
1 @node Jobserver
2 @cindex jobserver
3 @unnumbered Jobserver
4
5 Parallel builds are made by utilizing the jobserver protocol. Each job
6 have to take so called token and return it when it finishes. Jobserver
7 creates the pipe, consisting of read and write files, that are passed
8 to each @command{goredo} instance. Job takes the token by reading the
9 single byte from that pipe, writing it back for returning. Pipe is
10 pre-filled with required number of tokens.
11
12 @pindex bmake
13 @pindex gmake
14 @command{goredo} can be integrated with
15 @url{http://netbsd.org/, NetBSD}'s
16 @url{http://www.crufty.net/help/sjg/bmake.htm, bmake} and
17 @url{https://www.gnu.org/software/make/, GNU Make} (@command{gmake})
18 jobserver protocol. All three of them use the same principle of
19 jobserver, but different ways of passing pipe's file descriptors
20 numbers to child process.
21
22 @vindex REDO_MAKE
23 @env{$REDO_MAKE} environment variable controls the compatibility behaviour:
24
25 @table @command
26 @item bmake
27 Pass @code{-j 1 -J X,Y} arguments through @env{$MAKEFLAGS} variable.
28 @item gmake
29 Pass @code{--jobserver-auth=X,Y} arguments through @env{$MAKEFLAGS} variable.
30 Beware that only @option{--jobserver-style=pipe} protocol is supported!
31 @item none
32 Pass @code{X,Y} arguments through @env{$REDO_JS_FD} variable.
33 Used by default, if @env{$REDO_MAKE} is not set.
34 @end table