tech-toolchain archive

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

Re: make .ORDER



On Tue, Jan 29, 2013 at 11:31:12PM -0800, Aaron J. Grier wrote:
> 
> I've often thought it would be either a good test of makefile mettle or
> dastardly fiendish to have an option to make which chose leaf nodes of
> the dependency tree at random, to see if your dependency rules are
> actually complete.

NetBSD's make needs some work in that area.
I believe it used to try to generate a dependency list linked such
that the last node would always be the one to build next.

When I fixed .WAIT it all went horrribly wrong and it ends up scaning
the list until it finds a node it can build (I think this might chew a
lot of cpu sometimes, and maybe leak memory!).

It would be better to keep a list of the nodes with no dependencies,
and whenever anything is built just remove the relevant dependencies
and, if a node now has no dependencies move it to the list of buildable
items.

That you make 'randmon' order much easier to implement.

Unfortunately when I had a quick look a while ago I couldn't remember
the perverted structure it actually uses!

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index