Checking in DOs during a build
You can write a build script that creates a derived object and then checks it in or converts it to an element.
However, the VersionVault build tool does not create a configuration record until the build script is completed (all commands after the target-name: are executed). Therefore, if the same build script that created the DO checks it in or converts it to an element, the resulting version is not a DO version.
For example, the version created by the following build script is not a DO version:
buildit : buildit.c
cleartool co -unres -nc $@
del /F $@
cl /c $@ $*.c
cleartool ci -nc buildit
You can work around this problem by building and checking in a derived object in two steps. For example, the makefile contains one build script that creates the DO, and another build script that checks it in, as shown here:
buildit : buildit.c
cleartool co -unres -nc $@
del /F $@
cl /c $@ $*.c
stageit : buildit
cleartool ci -nc buildit
The command clearmake stageit performs the following steps:
- Brings the target
buildit
up to date. This creates a DO namedbuildit
and an associated configuration record. - Brings the target
stageit
up to date. This step checks in thebuildit
derived object as a DO version.