I have a large number of classes in a project, and I would like to compile all of them from a script. The thing is, the classes should be compiled in a certain order, for example: I have a class named **A** which depends on a class named **B**. Let's say class **B** depends on a class named **C**. In order for me to compile class A, I would have to compile first B and C.

Is there some tool I could use to establish the compile order of the classes, so that I don't have to parse each class and determine this myself? I would preffer that the tool can save a file with the order of the files to be compiled, so that I could parse that from my script.

Thanks !