help-make
[Top][All Lists]
Advanced

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

RE: improvements for parallel makes ?


From: Paul D. Smith
Subject: RE: improvements for parallel makes ?
Date: Thu, 20 Apr 2006 11:57:10 -0400

%% "Meinecke, Jon" <address@hidden> writes:

  mj> Isn't .WAIT just a short hand for a dependency relationship?

  mj>   foobar : a b c .WAIT D E F

  mj> Isn't this the same as

  mj>   foobar : a b c D E F

  mj>   D E F : a b c

Actually more accurately you mean:

    D E F : | a b c

If that's all it were then I would just tell people to use this and not
even consider .WAIT.

  mj> Would it be possible to easily implement .WAIT to simply generate
  mj> this dependency?  Or am I missing something?

It's not that easy.  Consider this:

    foobar: a b c .WAIT D E F

    D: X
    E: Y
    F: Z

A .WAIT would mean that not only would D, E, and F not run until after
a, b, and c finish, but also that the "second order" prerequisites X, Y,
and Z (etc.) would also not run until a, b, and c are complete.  A
transformation to this:

    foobar: a b c D E F

    D E F : | a b c

    D: X
    E: Y
    F: Z

would not be sufficient: X, Y, and Z don't depend on a, b, and c so make
would still build them in parallel.

In order to really get at what .WAIT is intended to do you'd have to
convert the original to this:

    foobar: a b c D E F

    D: X
    E: Y
    F: Z

    D E F X Y Z : | a b c

and so on for the entire dependency tree rooted at D, E, and F.  Which
could be done, but is not that trivial and may not be the best way to
proceed in terms of efficiency etc.

-- 
-------------------------------------------------------------------------------
 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]