On Sat, 31 Jul 1999, Chris Kakris wrote:

> Chris Abbey wrote:
> > 
> > A couple people mentioned that javac will recompile any classes referenced
> > by what you compile and recompile them if they're newer... true, but DON'T
> > RELY ON THAT to save you: it misses the opposite link. Say for example you
> > have a static final boolean, and you change it... any class which uses it
> > must now be recompiled. Jikes figures out dependencies for each file you
> > compile. You can take advantage of this feature with the incremental
> > compile option. For example: say you have a project with a dozen or so
> > .javas execute "jikes ++ *.java" and it will churn through and compile
> > everything, then put out a prompt asking you to hit enter, go edit your
> > code, come back to the shell jikes is running in and hit enter... it will
> > recompile only the classes that need it, including the ones like I
> > mentioned above.
> 
> I would be interested to know how you handle projects with java
> source files scattered throughout a tree hierachy.  In the past
> I have used munged-up Makefiles with hard coded lists of source
> files in them.  These Makefiles would recursively build all
> subdirectories.  Are you suggesting that I could do something
> like this:

You might run into problem with that approach. In Java the path
name of the file defined what package it should be inside of.
The best thing to do is something like this.

cd TREE_ROOT
jikes pkg1/*.java pkg2/*.java pkg3/subpkg3/*.java -d COMPILED_ROOT

Where TREE_ROOT is the root of your source tree (the place where
the com directory in a com.something package lives) and the
COMPILED_ROOT is the location where the resulting .class files
will go.

I hope that helps.
Mo DeJong
 
>   find . -name \*.java -print | xargs jikes ++
> 
> Chris Kakris
> 
> "Ask not what Linux can do for you, but what you can do for Linux."
> 
> Dynamic Solutions Pty Ltd      http://www.dynamic.net.au/christos
> 414 Gilbert Road               [EMAIL PROTECTED]
> Preston, Victoria 3072         61 3 94718224 - voice
> Australia                      61 3 94711622 - fax
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to