I\'m looking for a simple algorithm to \'serialize\' a directed graph. In particular I\'ve got a set of files with interdependencies on their execution order, and I want to
I would expect tools that need this simply walk the tree in a depth-first manner and when they hit a leaf, just process it (e.g. compile) and remove it from the graph (or mark it as processed, and treat nodes with all leaves processed as leaves).
As long as it's a DAG, this simple stack-based walk should be trivial.