help-make
[Top][All Lists]
Advanced

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

Re: looking for build order doc in parallel build


From: grischka
Subject: Re: looking for build order doc in parallel build
Date: Sat, 21 Nov 2009 01:34:11 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Paul Smith wrote:
> It's true that make will always walk the dependency graph in
> depth-first order.

Well, I think that is true and not true at the same time.
Basically the keyword here is "always", as in "Always when make
walks the dependency graph it happens in depth-first order."

> Even though make considers targets in depth-first order, ...

Well, strictly speaking there isn't much order at all.  As can
be seen from the log below, basically any file is considered
before as well as after any other file, simply because everything
is considered several times.

So I think the OP has a point here.  Of course the behavior does
or should not matter as long as the makefile is parallel-safe.
However it is not the only possible behavior, and maybe also not
the most conclusive one.  It is just how GNU make happens to work,
by its "embedded algorithm", as you wrote:

> There's no one place you can go to see the algorithm.  It is
> embedded in the way make works.

--- grischka

$ make -r -j2 -d | grep Considering
Considering target file `makefile'.
Considering target file `all'.
        Considering target file `1.pdf'.
         Considering target file `1.fo'.
        Considering target file `2.pdf'.
         Considering target file `2.fo'.
        Considering target file `3.pdf'.
         Considering target file `3.fo'.
        Considering target file `4.pdf'.
         Considering target file `4.fo'.
        Considering target file `5.pdf'.
         Considering target file `5.fo'.
        Considering target file `6.pdf'.
         Considering target file `6.fo'.
        Considering target file `7.pdf'.
         Considering target file `7.fo'.
        Considering target file `8.pdf'.
         Considering target file `8.fo'.
Considering target file `all'.
        Considering target file `1.pdf'.
         Considering target file `1.fo'.
        Considering target file `2.pdf'.
         Considering target file `2.fo'.
        Considering target file `3.pdf'.
         Considering target file `3.fo'.
        Considering target file `4.pdf'.
         Considering target file `4.fo'.
        Considering target file `5.pdf'.
         Considering target file `5.fo'.
        Considering target file `6.pdf'.
         Considering target file `6.fo'.
        Considering target file `7.pdf'.
         Considering target file `7.fo'.
        Considering target file `8.pdf'.
         Considering target file `8.fo'.
Considering target file `all'.
        Considering target file `1.pdf'.
        Considering target file `2.pdf'.
        Considering target file `3.pdf'.
        Considering target file `4.pdf'.
        Considering target file `5.pdf'.
        Considering target file `6.pdf'.
        Considering target file `7.pdf'.
        Considering target file `8.pdf'.
         Considering target file `8.fo'.
Considering target file `all'.
        Considering target file `1.pdf'.
        Considering target file `2.pdf'.
        Considering target file `3.pdf'.
        Considering target file `4.pdf'.
        Considering target file `5.pdf'.
        Considering target file `6.pdf'.
        Considering target file `7.pdf'.
        Considering target file `8.pdf'.
         Considering target file `8.fo'.
Considering target file `all'.
        Considering target file `1.pdf'.
        Considering target file `2.pdf'.
        Considering target file `3.pdf'.
        Considering target file `4.pdf'.
        Considering target file `5.pdf'.
        Considering target file `6.pdf'.
        Considering target file `7.pdf'.
        Considering target file `8.pdf'.
Considering target file `all'.





reply via email to

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