Checking in DOs during a build

You can write a build script that creates a derived object and then check in or convert it to an element.

However, the HCL 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 $@
   rm -fr $@
   cc -o $@ $*.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 $@
   rm -fr $@
   cc -o $@ $*.c

stageit : buildit 
   cleartool ci -nc buildit

The command clearmake stageit performs the following steps:

  1. Brings the target buildit up to date. This creates a DO named buildit and an associated configuration record.
  2. Brings the target stageit up to date. This step checks in the buildit derived object as a DO version.