in reply to Dependency Inference
Basically the set of dependencies is (or should be) a directed acyclic graph. One does what's called a "topological sort" to determine the proper ordering of the nodes (it's nothing more than a post-ordering in a depth-first traversal). Take a look at Algorithm::Dependency.
A standard approach to represent dependencies is to do list the "target" followed by all the items it directoy depends on. E.g.
Both A::D and make use this basic idea.myapp foo.o bar.o baz.o
the lowliest monk
|
|---|