Follow these basic steps.
- Find files without any dependencies
- Add those to the build first
- Find files dependent on those in build and nothing else
- Add those to build next
- Repeat 3 and 4 until all files in build
You'll need some checks to detect circular dependencies which would cause and endless loop on step 5. Other than that, this should work.
Sam
2010-04-13 18:44:18