Greetings, all,

I've been working on the developer guide chapters about the build system, and 
it motivated me to complete a particularly cool feature enabled by the 
AutoConfig system: implicit and default targets.

The idea behind implicit targets is that many of the targets currently required 
in the local.build.xml file have a very stereotypical definition that could be 
automatically generated by the AutoConfig system.  These targets include: 
 - <module>.javadoc
 - <module>.java2html
 - <module>.junitReport
 - <module>.locc
 - <module>.clean
 - <module>.checkstyle

As of the latest commit, when you run 'ant -f autoconfig.build.xml', the system 
will check to see if your local.build.xml file contains these targets, and if 
it doesn't, AutoConfig will define them automatically for you in the 
modules.build.xml file.  This is quite nice---it cuts the size of the 
local.build.xml file in half, and (besides some property definitions), all you 
normally have to consider defining now in local.build.xml are:

 - <module>.compile
 - <module>.pre-sensorshell
 - <module>.post-sensorshell
 - <module>.junit

But wait, it gets better. In lots of cases, you don't have anything to do for 
the post-sensorshell target, for example. Until now, the build system required 
you to define an empty target in this case, but now the build system will 
implement a default empty target for the above four targets if you don't 
provide them explicitly.  

There is another implication of this approach: as the build system grows and we 
decide to add new functionality, we can do this by defining a default target 
(which either does nothing or provides a stereotypical implementation) in 
AutoConfig.  Then, we define an explicit version of the target only in those 
modules for which the default or stereotypical one isn't appropriate.  This 
makes the build system much more scalable. 

I've just committed the changes to AutoConfig system, and everything appears to 
work fine.  I will next go through the existing modules and remove the current 
javadoc, java2html, etc. target definitions so that future developers don't get 
confused by their presence (and also to cut down on the size/complexity of 
these local build files.)  I've already done this for the hackyCore_Kernel 
module, and I'll wait until tomorrow to start on the rest to be sure that the 
build passes tonight and everything seems copacetic. 

Cheers,
Philip

Reply via email to