|
|||
How to add version tag to my product?You probably need to use a shell script before build to specify the value of Version and Version_time, and modify from here:
/* For example:
Version=v1.0
Version_time=14:35
*/
/* To link id.o for all the :: targets */
.INSERT.%.COMMAND: .ID.o
.ID.o : .MAKE .VIRTUAL .REPEAT .FORCE .IGNORE
$(<<) : id.o
/* To create id.c as ANSI C or C++ code, and you have to declare
char* stampid;
somewhere in your source code
*/
id.c : (Version) (Version_time) .SPECIAL
cat >$(<) <<'!'
void sTaMpSUB(){
extern char *stampid;
stampid="@(#)MY_PROD(Alcatel-Lucent) $(Version) $(Version_time)";
}
!
If the above rules are put in the global makefile, the rules will apply to all
the ' For a similar example, see the Sablime page How To Version Tag Your Product. Last Update: Wednesday,20-Dec-06 13:22:01 CST
|
|||