This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Here's a module-dependency analyser


A nice thing about the javac command is that 'javac *.java' will analyse
dependencies between all files and compile them in the correct dependency
order. Kawa doesn't do that yet, so I've written a little program to help
when I have to recompile large parts of my systems. It reads a designated
module, extracts all the 'require'd classes, and then does a depth-first
search over the dependency tree as defined by the requires, reading other
modules as necessary. It then topologically sorts the classes, and
generates a batch file to compile all their source files in the correct
order.

It could no doubt be improved: doesn't handle cycles yet, doesn't do
dependencies other than through 'require', and doesn't know about modules
defined in Java (since I never do this). But it might be useful to others.
The code is available via
http://www.ifs.org.uk/~popx/module_dependencies.html .

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]