IBM Support

Automatically executing actions or commands after the normal Rose RealTime build

Troubleshooting


Problem

Sometimes users want to add steps to the normal IBM Rational Rose RealTime build process. This technote explains how to automatically execute additional actions or commands after the regular build steps.

Resolving The Problem

The CompilationMakeInsert (Component, C++ Compilation) property can be used to specify commands that will be executed after the regular build completes.

The text that is added in this property/field will be inserted into the following makefile:

$@/$name/build/Makefile.
where...
  • $@ is the model file directory
  • $name is the name of the component being built

This makefile has several macros and the makefile rule that compiles the "Top" capsule:

BUILD_TARGET = $(TOP_CAPSULE)$(EXEC_EXT)
...
COMPILE_TARGET = $(BUILD_TARGET)
...
<<< CompilationMakeInsert text is added here, just before the RTCompile makefile rule.
RTcompile : $(COMPILE_TARGET)
...

By redefining the COMPILE_TARGET, extra steps can be added to the build. For example:

COMPILE_TARGET = myPostRule
myPostRule : $(BUILD_TARGET)
echo Finished compilation
dir
start cmd.exe /k "$(BUILD_TARGET) -URTS_DEBUG=quit"

Here is the equivalent Unix example:

COMPILE_TARGET = myPostRule
myPostRule : $(BUILD_TARGET)
@echo Finished compilation
ls -l
xterm -e $(BUILD_TARGET) -URTS_DEBUG=quit

Note: The TOP_CAPSULE will run, but limitations on the command shell won't allow the Build process inside Rose RealTime to "complete" until the command shell is closed, that is the Build Icon remains grayed out and the Stop Build icon is still active until the command shell completes.

[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"2002;2003","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

116032306

Document Information

Modified date:
16 June 2018

UID

swg21120293