OpenMake Meister

Build Service Attributes

 

The attributes of a Build Services include Build Tasks, Build Rules and Build Options.  These attributes exist in a hierarchical relationship as defined in Graph B-1.

 

Graph B-1  Build Services Hierarchy

Build Services

 

 

Build Tasks

     Options

 

 

 

Option Groups:

  Sets of  Options

 

Build Rules:

  Rule extensions

  Options

  Build Methods

 

 

Following is a description of a Build Services and its attributes and methods.

 

Build TaskA Build Task identifies a particular step in the build, for example calling the javac compiler or setting the ClasspathBuild Services require at least one Build Task.

 

Option Groups- Organizing sets of Options is done using Option Groups. When a developer creates their Target they can define several source dependencies to the Option Group as defined by the Build Service.  All dependencies will be built using the options as defined by the group.

 

Build Rules and Options - A Build Task is outlined by Build Rules.  The Build Rules define how the Build Task will be executed including the use of Build Options which are typically compile flags and parameters.  Build Tasks must contain at least one Build Rule. Build Rules are defined based on source dependency extensions and Target file extensions.  A common rule is a .c file becomes a .obj file after the Build Task executes. Build Rules cause an action to occur when the Build Rule is "true".  For example, if a .c file exists, then a .obj file must be created.  Each Build Rule is assigned a command line process to execute the action. This process is called a Build Method.

 

Build Methods - A Build Method is a reusable template written in PERL, that standardizes how a compiler or tool is called during the build.  It serves to perform the action of the Build Rule, when the Build Rule is "fired".  The Build Method is reusable.  It contains no application specific file information.  Build Methods become the build script which is generated by the program called bldmake. bldmake uses the Target file specific information combined with the Build Method to format the build script and produce the build results as shown below in Table B-1.  For more information on Build Methods refer to the Writing and Using Build Methods section of this guide.



Table B-1     Build Task, Rule, Method and Target Mapping

Build Task

Build Rule

Build Method

Target Data

Results

Compile

 

.java > .class

Ant Javac.sc

foo.java

foo.class

Java Jar

 

.class, .jar >.jar

Ant Jar.sc

foobar.jar

 

Coolapp.jar