ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@mad.scientist.com>
Subject Re: build depending on dependencies
Date Thu, 31 Aug 2000 15:14:30 GMT
At 09:04  31/8/00 -0500, you wrote:
>Is it possible in ant to compile only those java-files on which
>some specific file or package depends (e.g. as JBuilder does )?
>Recursive compiling of all packages significantly increases
>the size of products.

umm - well that sorta does happen. The problem is that some compilers are
broken (javac). Even the un-broken compiler jikes on full dependancy checks
doesn't check all dependancies. Code that is optimized out completely 

ie.
if( !Blah.VAR )
{
  ///do something
}

where Blah.VAR is a static final variable defined as false

will not be taken into account for dependancy checks - other than a few
other rare circumstances that should do it.

Make sure you put the following things in build file

  <property name="build.compiler" value="jikes"/>
  <property name="build.compiler.emacs" value="on"/>
  <property name="build.compiler.warnings" value="true"/>
  <property name="build.compiler.pedantic" value="true"/>
  <property name="build.compiler.depend" value="true"/>


Make sure you get jikes =) and also make sure your package structure
matches directory structure.

ie so if your source directory is "src/" and you have a class in package
"com.biz" then it should be in directory "src/com/biz". If you do all of
that and are still having issues - email back and I will see what else
needs doing :P



Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message