Adding a version string or time stamp to an executable

You can incorporate a version string and/or time stamp into a C-language compiled executable using simple techniques.

Including a version string or time stamp allows anyone (for example, a customer) to determine the exact version of a program by entering a shell command.

The following techniques support the use of the what command or the -Ver option. For example:

% what monet
monet R2.0 Baselevel 1
Thu Feb 11 17:33:23 EST 2003
% monet -Ver
monet R2.0 Baselevel 1 (Thu Feb 11 17:33:23 EST 2003)

After the particular version of the program is determined, you can use HCL VersionVault commands to find a local copy, examine its config record, and if appropriate, reconstruct the source configuration with which it was built. (Presumably, the local copy is a derived object that has been checked in as a version of an element.)

You can identify the appropriate derived object by attaching a HCL VersionVault attribute with the version string to the checked-in executable, or you can rely on the time stamp and your ability to run the what command on the checked-in executable to find it.