[Omake] Printing dependencies recursively?

Jason Hickey jyh at cs.caltech.edu
Mon Jun 12 10:57:03 PDT 2006


Benjamin Pierce wrote:
> Is there a way to get omake to print *all* the (transitive)  
> dependencies of a given target, all at once?  The --print- dependencies 
> flag seems to go just one level deep, and this often  makes it tedious 
> to understand why things are not being rebuilt when  I think they ought 
> to be.

I'll see about adding another option like --print-dependencies-rec.

For a short-term band-aid, would this help?

    .PHONY: printdeps

    # foo is the target we want dependencies for
    printdeps: foo
        eprintln($"dependencies for foo: $(dependencies-all foo)")

The problem with this approach is that foo must be built before its 
dependencies are printed.  If you have access to the rule for foo, you 
could edit it directly.

The dependencies-* functions walk the actual build tree to compute 
dependencies.  For accuracy, they need to occur in the rule body to 
ensure that the build tree has been fully expanded.

Jason

-- 
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257


More information about the Omake mailing list