This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Here's a module-dependency analyser
- From: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- To: kawa at sources dot redhat dot com
- Date: Thu, 15 Nov 2001 15:19:06 +0000 (GMT)
- Subject: 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