bug-make
[Top][All Lists]
Advanced

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

Re: [bug #40225] Deterministic output ordering


From: Frank Heckenbach
Subject: Re: [bug #40225] Deterministic output ordering
Date: Thu, 10 Oct 2013 07:29:46 +0200

Paul D. Smith wrote:

> A non-parallel build is actually fully deterministic for a given makefile.
> Make (I believe this is specified by POSIX) will always try to build the first
> prerequisite first, then the second, etc.  Of course there are ways to get
> non-determinism: for example IIRC the $(wildcard ...) function returns files
> in "directory order", unsorted, which is non-deterministic.
> 
> I'm not saying Frank's idea would not work but I think it might be slightly
> hairier than described here.

Because of $(wildcard ...) or anything else? (I feel like I'm
missing something in your comment here.)

$(wildcard ...) might not be a problem in practical terms since the
directory order is unlikely to change between two runs. If it is a
problem, one can always use $(sort ...). So I'd put this
responsibility on the user, and if non-parallel make is otherwise
deterministic (and parallel make uses the same deterministic order
to *start* children), that seems fine.



reply via email to

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