bug-make
[Top][All Lists]
Advanced

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

Re: New feature: Post-requisites


From: Alejandro Colomar (man-pages)
Subject: Re: New feature: Post-requisites
Date: Sun, 31 Jul 2022 14:45:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Hi Paul

On 7/31/22 14:36, Paul Smith wrote:
On Sun, 2022-07-31 at 11:45 +0200, Alejandro Colomar (man-pages) wrote:
If some new post-requisite "baz" was found while building either
"foo" or "bar", it would be built after those and be as if the user
had invoked "make foo bar baz".

What if one runs `make -j foo foo2` and both foo and foo2 have a
post-requisite of bar?  `make -j foo foo2 bar` doesn't guarantee that
bar will be started after foo2 ends, but this feature would need such
a guarantee.

Well, what I was really thinking was that the postrequisites would go
into their own list.  So the set of "current" goals would be in one
list and the postrequisites would be added to a new list.  Once all the
current goals were completed, then make would start working on the new
list, and any further postrequisites would be added to a new new list.
Etc. until the "new list" was empty (no more postrequisites were added
during the last set of builds).

That makes sense to me. The performance is suboptimal, I think, since it needs to wait for all "current" goals even if there was no actual dependency to some of them. But if the implementation is much simpler, I think it's a good tradeoff. Looks good to me.

The ideal solution would be to extend the DAG in some way that includes the post-requisites, but that would need an architectural change.

Cheers,

Alex

--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

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