OpenMake Meister

Build Rules

 

Build Rules outline the steps executed within the Build Task.  Build Rules are defined based on file extensions for dependencies and results or “from extensions” and a “to extension”.  Each “to extension” represents what is created after the Build Rule is fired, called the Results Extension.   Table B-6 describes the attributes of the Build Rules.

 

Table B-6 Build Rule Attributes

Results Extension

When the Build Rule "fires" the results will create a file with this extension.

Dependency Extension

The Build Rule is dependent upon files with this extension.  There can be more than one dependency extension.

Build Method to Execute

When the Build Rule "fires", a reusable build template executes.  This reusable build template is a pre-written Perl Script called a Build Method. Select the Build Method that will be used as the process for your Build Rule. For more information on Build Methods, refer to the Writing and Using Build Methods section of this guide.

Results Based On

The names of Build Rule results must be derived dynamically in order for the Build Rule to be reusable.  Some Build Rules create a single result, while others create multiple results. 

 

This attribute indicates how to name Build Rule results as they are being written. You can select a dependency extension to indicate to use the name of that dependency to write the result.

 

You can also select Final Target indicating to the Build Rule to derive the name of the result based on the name used in the Target  definition.

Results Created In

This attribute indicates what file system directory should be used to write the results of the Build Rule.  When Final Target is selected the results of the Build Rule will be written to the file system directory of the Final Target.  If the Final Target does not have a directory as part of its definition, then the local build directory will be used. For example, a Final Target called bin\foo.jar would use the bin directory to write the results of the Build Rule.  A Final Target called foo.jar would use the local build directory to write the results of the Build Rule.

 

Other options include:

 

Intermediate  – This field allows the developers to use an Intermediate directory to write the results of the Build Rule. When defining Targets developers can choose to use the name of an Intermediate Build Rule Result.  A common use for this is writing all .obj files to an obj directory, or all .class files to a class directory.  This option gives the developers the flexibility they need when building their unique Targets.

 

If "Intermediate " is selected and the developers do not name the Intermediate Directory when defining their Target, the default will be to the use the Final Target Directory.

 

Intermediate + Dependency – This option is needed when the compiler being called requires that the target be written to the directory structure of the dependency.  By using the "Intermediate + Dependency " option, the name of the intermediate directory is added to the front of the dependency directory name. For example, for a C source file called:

src/acctpay/report.c

and an Intermediate Directory name of:

obj

the compiled object file will be called:

obj/src/acctpay/report.obj

If the Build Service uses an intermediate directory and the Developer does not name the Intermediate Directory in the Target then the Final Target + Dependency will be used as the default directory. 

 

Use as Final Target

The final result of the execution of all Build Rules is your Final Target.  Select this radio button to indicate that this Result Extension is the Final Target.  This information will then be visible from Build Service Overview screen.  There is only one Final Target for a Build Service.