Discussion Forum

Version information in build

Next Thread | Thread List | Previous Thread Start a Thread | Settings

version_$";whereversion_$ will be replaced with real version information by the source control tool.

You will need to read the Manual for your particular source control tool for find out precisely how it does it.

Even without a source control tool you can get a simple timestamp by, eg,
code char build_timestamp[] = "__DATE__" "__TIME__";
Put this in a file - say timestamp.c - and set its project options to 'Always Rebuild'.

http://www.keil.com/support/man/docs/c51/c51_pp_predefmacroconst.htm


See also: http://www.keil.com/forum/docs/thread780.asp version_$ * etc... : : */Again, you need to check the documentaion for your source control system for specific details.
I'd be surprised if it didn't actually tell you all this itself!
DetailsMessage
Read-Only
Author
Victoria Selin
Posted
24-Jul-2006 07:11 GMT
Toolset
None
New! Version information in build
Is it possible to create some kind of listing, in the compile/linking time, with file version information,taken from source control program (ClearCase in our case)?
I mean that I want to have detailed information, of what version of which file was used in current compilation.
Thank you in advance :)
Read-Only
Author
A.W. Neil
Posted
24-Jul-2006 08:20 GMT
Toolset
None
New! RE: Version information in build
Most source control systems have some way to insert version information into the text of the controlled files - usually by some sort of keyword expansion.

You just need to use this to initialise some strings in code space; eg,
code char version[] ="
Read-Only
Author
A.W. Neil
Posted
24-Jul-2006 08:20 GMT
Toolset
None
New! RE: Version information in build
Read-Only
Author
A.W. Neil
Posted
24-Jul-2006 08:20 GMT
Toolset
None
New! RE: Version information in build
Read-Only
Author
A.W. Neil
Posted
24-Jul-2006 08:27 GMT
Toolset
None
New! RE: Version information in build
Did I get the wrong end of the stick there?

You just want a listing, rather than to embed the information in the generated object file(s)?

If that's the case, the solution is similar - but you just get the source control system to put the information into a comment somewhere in each file.

The header comment for each file would seem the obvious place...

eg,
/* File:    blah.c
 * Version: 
Read-Only
Author
A.W. Neil
Posted
24-Jul-2006 08:27 GMT
Toolset
None
New! RE: Version information in build

Next Thread | Thread List | Previous Thread Start a Thread | Settings