Chapter 7. Command Line Translation and Build

This chapter explains the mechanics of turning xtUML models into C code using MC-3020 on the command line.

xtumlmc_build: Command Line Build Automation

A build execution utility called xtumlmc_build is available to enable translation from model xtuml and SQL files.

Utility

A command line build utility called xtumlmc_build allows for custom automation of the build process and for building from exported model files. xtumlmc_build operates on BridgePoint models exported to *.xtuml/*.sql/*.bak files as well as *.xtuml files from BridgePoint version 7 and beyond. xtumlmc_build will create a build directory, copy in the supplied marking files and translate a model supplied in a file. This frees the build process from the BridgePoint model repository.

One expected use for xtumlmc_build would be automation of batch oriented build operations. Once marking and configuration of a particular build have been established interactively, xtumlmc_build can be used to repeat the build in a single step.

xtumlmc_build can also be used in conjunction with third-party version control systems (such as CVS, CleareCASE). xtumlmc_build could also be used when building models extracted from multiple repositories. A build server could use this utility to perform automatic translation of newly checked in materials. xtumlmc_build also serves in test suite automation.

Note that .mark is superceding .clr for the extension of marking files (formerly coloring files). .clr is maintained for backward compatibility.

Usage

To get the latest syntax for xtumlmc_build run: xtumlmc_build -h. Command line help will be supplied.

xtumlmc_build(-h,
 -d directory,
 -O output directory,
 -e,
 -m xtUML model file,
 -o xtUML_domain,
 -s SQL_file,
 -r EE,
 -f file);
 

Where the command line parameters are:

-h

Usage help will be printed.

-e

This is used to indicate that xtumlmc_build was called from CDT/Eclipse.

directory

Directory into which the generated code will be built. This directory will be created. Be sure it does not already exist.

output directory

Directory/folder into which the generated source files will be copied. Only the .c and .h files will be copied to this folder. This folder must already exist.

xtUML model file

This is the xtUML model as from BridgePoint Builder version 7 or later.

xtUML_domain

This is the domain name as known inside BridgePoint Builder (not the registered domain name).

SQL_file

This is the xtUML model as dumped from BridgePoint Builder using the Export capability.

EE

EE is a ``realized'' external entity that the current xtUML_domain uses.

file

All of the marking files (bridge.mark, system.mark, etc.) are each listed with the -f flag. .c and .h files are listed in the same way. When running multiple domains, domain marking files must be prepended with their domain name and underscore, for example -f microwave_domain.mark or -f odms_class.mark.

Example 7.1. Simple xtumlmc_build Example

xtumlmc_build -d d -o dogs -m dogs.xtuml -r ARCH -f dogs_domain.mark -f registry.mark 
      


Example 7.2. Two Domain xtumlmc_build Example

xtumlmc_build -d ae1 -o as2 -s as2.sql -r CARPIO -r SPPIO -r UI -f as2_domain.mark
-f as2_event.mark -f bridge.mark -f registry.mark -f datatype.mark -o exp
-s exp.sql -f exp_domain.mark -f sys_user_co.c -f sys_user_co.h -f link_sys
      


Note that (-f) files should be listed immediately following their own domain when making a multi-domain build.