]> Cypherpunks.ru repositories - goredo.git/blob - doc/jobserver.texi
Redundant @documentencoding
[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://www.crufty.net/help/sjg/bmake.htm, bmake} and
16 @url{https://www.gnu.org/software/make/, GNU Make} (@command{gmake})
17 jobserver protocol. All three of them use the same principle of
18 jobserver, but different ways of passing pipe's file descriptors
19 numbers to child process.
20
21 @vindex REDO_MAKE
22 @env{$REDO_MAKE} environment variable controls the compatibility behaviour:
23
24 @table @command
25 @item bmake
26 Pass @code{-j 1 -J X,Y} arguments through @env{$MAKEFLAGS} variable.
27 @item gmake
28 Pass @code{--jobserver-auth=X,Y} arguments through @env{$MAKEFLAGS} variable.
29 @item none
30 Pass @code{X,Y} arguments through @env{$REDO_JS_FD} variable.
31 Used by default, if @env{$REDO_MAKE} is not set.
32 @end table