help-make
[Top][All Lists]
Advanced

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

Re: some parallel make questions


From: Paul D. Smith
Subject: Re: some parallel make questions
Date: Mon, 5 Aug 2002 11:39:34 -0400

%% Yossi Itzkovich <address@hidden> writes:

  yi> 1. Is the calculation of -l (load) is per user/session/station ?  

The load is the system load.  Use "uptime"; see those three numbers?
That's the load make uses.

  yi> For examle: If I launch on the same makefile, two make session at
  yi> the same time, on the same machine - but with different targets
  yi> (unrelated ones) - what will be the -l (in both sessions) for ?
  yi> If, for example, I give both session -l 2, will they both be -l 4,
  yi> or still -l 2, which means that they will both "share" the load.?
  yi> and what about two users ?  same user on different machines (on
  yi> same makefile) ?

As above, the load is per-system.  So all invocations of make for all
users will compare their -l request against the same load value.

  yi> 2. I have a Makefile.system that launches many recursive
  yi>    sub-makes.  Among its targets are clean,compile,build.  I
  yi>    thought of doing something like:

  yi> build:  clean  compile

  yi> clean:
  yi>         ....

  yi> compile:
  yi>         ....

  yi> If things are done serialy - then when invoking "make build" it
  yi> will invoke clean and then compile.  But what will be the results
  yi> with parallel make ?

They will be run at the same time.

If you want to guarantee that they happen in a particular order, you
must define the order... in this case that's very difficult.  You might
try this instead:

  build: clean
        $(MAKE) compile

  clean:
        ...
  compile:
        ...

This involves an extra invocation of make, but it will work properly
even during parallel builds.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

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