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