Is there a tool for automating adding packages to INI

I am an Unreal dev noob. I have legacy UE3 source code that I would like to compile, more than 15,000 packages worth. My understanding is, each of these packages must be added to DefaultEngine.ini before the compiler can ‘see’ them. This is quite different than most compilers I’ve worked with, but OK. The other issue is, these packages must be added in the correct order based on class dependencies in the DefaultEngine.ini file, which makes things even more difficult.

So my question is, are there any tools that exist that can automate the process of adding packages to the ini file in the order they need to be in? Failing that, is there at least a tool that can dump the class hierarchy of a set of source files, which I could then use to write my own tool to figure out the necessary order of the files and programmatically insert them into the ini file.

I have already spent a few hours searching, and the closest thing I have found is uncodex. While that tool can create a class hierarchy for you, I do not see any way to dump the hierarchy in a format other than HTML documents that looks similar to javadocs. I would need an output that lays out the hierarchy in some kind of schema that I can parse programmatically.