4 messages in com.perforce.jammingcompile multiple files at once?| From | Sent On | Attachments |
|---|---|---|
| Dave...@vignette.com | 30 Jul 1998 09:28 | |
| Jym ...@igc.org | 30 Jul 1998 13:46 | |
| Igor...@fi.uib.no | 31 Jul 1998 09:19 | .gz |
| Dave...@vignette.com | 03 Aug 1998 07:45 |
| Subject: | compile multiple files at once?![]() |
|---|---|
| From: | Igor...@fi.uib.no (Igor...@fi.uib.no) |
| Date: | 07/31/1998 09:19:45 AM |
| List: | com.perforce.jamming |
| Attachments: | ![]() javajam.tar.gz - 0.9k |
On Thu, 30 Jul 1998, Jym Dyer wrote:
=o= Yeah, but that's happens when the compiler does dependency- based builds. Plain old "make" has this problem as well.
=o= As of Java 1.1, there's also the issue of compiles making extra .class files with auto-generated names for anonymous inner classes.
=o= An additional complication is that the javac compiler's dependency-checking will not necessarily detect complicated interdependent relationships, unless you make sure to compile the interdependent source files together. Thus I've found the only reliable way to work is to group the source files in directory/package structures and run this command:
% javac *.java
And what they produce is always referred to as *.class, so as to pick up the anonymous inner class files as well. <_Jym_>
But what about treating javac as linker and not as a compiler? I wrote very simple java Jambase that is based on this approach. The trick is to introduce a java "project" file which would store last compilation time and issue after javac compilation "touch -m project" to update project compilation time. (You can get "touch" on Windows from Cygwin32)
To test this approach extract javajam.tar.gz to some directory and then type: jam -d2 -f javabase jam -d2 -f javabase java HelloWorld jam -d2 -f javabase java_clean java HelloWorld jam -d2 -f javabase java HelloWorld
This will compile /delete HelloWorld.java
I really would appreciate any thoughts about this approach.
Regards, Igor Boukanov. igor...@fi.uib.no http://www.fi.uib.no/~boukanov/





.gz