Alcatel-Lucent nmake Product Builder
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 '::' targets in the product. You may want to put the rules
only in those leaf makefiles which build the targets that you want the
'what' string to appear.
Last Update: Monday,29-Jun-09 15:21:10 CDT