help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Second jobserver?


From: gmail
Subject: Second jobserver?
Date: Fri, 25 Jan 2008 01:15:52 +0100

Hi All,

Currently I work on basic distributed build system and found that scaling local and external resource is little tricky.
I base on basic idea to run preprocessor locally and push his output to remote node for compilation.
My problem is that currently gmake could control only one job group (via -jN) and sometimes it overload main node with preprocessing jobs.
Based on theory that preprocessing should be "much faster" that remote compilation I got idea of second jobserver for externals works.

it may look like:

SRC="" bar.c ogg.c tor.c
INT=$(SRC:%.c=%.i)
OBJ=$(INT:%.i=%.o)

all: $(OBJ)

#new keyword which should mark rules for second/external jobserver
.EXTERNAL: %.o

%.i: %.c
        $(CC) -E $< -o $@

%.o: %.i
        $(REMOTE_CC) $< -o $@

#gmake -j2 -x4 all

Which should run 2 local preprocessing work in parallel and up to 4 external compilations if any preprocess job finish. IMHO this may good contol local and external resources. Since I'm not guru in this matter then I want ask before start coding: Have such solution any sense?
If yest then could anyone give me some tips where start hacks?

Thakns
Rafal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]