Source-Changes-D archive

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

Re: CVS commit: othersrc/usr.bin/dholland-make2



On Sat, Mar 23, 2013 at 09:33:28PM +0000, David A. Holland wrote:
> Module Name:  othersrc
> Committed By: dholland
> Date:         Sat Mar 23 21:33:28 UTC 2013
> 
> Modified Files:
>       othersrc/usr.bin/dholland-make2: make.c
> 
> Log Message:
> Improve the toBeMade queue code so it doesn't do bulk array shifts
> every time you remove something from the queue head. If this turns out
> not to be good enough it can be tuned and/or made into a circular
> queue later.
> 
> (Also, in the long run, the non-tail insertions may go away; they seem
> to chiefly be associated with the .ORDER implementation and may not be
> needed after the primary graph structure gets some strengthening.)

I was thinking of giving up on the inital attempt at a 'graph'.
Instead just remember all the depndencies for each node.

Once the makefile has been parsed (so all the dependencies are linked
up) scan all the nodes and add any with no unmade dependencies to a
list 'things that can be built'.

After building something, scan through the targets that depend on the
now-built item, if that is their last dependency then move on to the
list of buildable items.

That will look at the nodes far less often than the hack I had to do
to get .ORDER working.

        David

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


Home | Main Index | Thread Index | Old Index