Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 3.1 & Java



On Monday, September 01, 2008 8:51 AM, Rainer Frey wrote:
On Saturday 30 August 2008 14:52:21 Mikael Hakman wrote:
On Saturday, August 30, 2008 1:54 PM, Piotr Rychlik wrote:

Mayby I am wrong, but it seems that each time I compile the project
every file is compiled regardless if it it was modified or not.

Ant works this way.

Not necessarily. Ant uses standard javac to compile, with no default option
set that affects recompiling. So if the classes output folder still exists,
it should compile only changed classes, to the extend that Sun javac supports
this. I have not (yet) worked with XCode and java, but I suspect that a full
project build might contain a cleanup target that deletes the compiled class
files from a previous run.

I was referring to Ant, not to javac. Javac has limited make functionality but it is only one of tens or hundreds of commands that may be used in Ant. If you study build.xml file created by Xcode you discover that it does a lot of other things than running javac. All those things will be done regardless whether any java source files changed or not. Ant does not have this make-like capability because it revolves around targets, not files, and therefore it cannot easily know when a target needs updating and when not. A target, even at the bottom of the target tree need not to correspond to a file, and from Ant's point of view it doesn't.


In JNI Java projects, build.xml file generated by Xcode is actually trying to optimize the rebuild process by invoking command line Xcode build for the C/C++ part of the project. Then this would rebuild only needed things, if it weren't for the fact that it runs javah every time and generates new header file, which forces full rebuild even of the C/C++ part.

Regards/Mikael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.