Mercurial > freewnn
changeset 9:bcc6b3ca758e
now _SERVER_VERSION includes revision from hg.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Fri, 21 Dec 2007 17:22:21 +0900 |
parents | 76281fa7934f |
children | fc3022f61fc7 |
files | Wnn/include/Makefile.in Wnn/include/commonhd.h |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Wnn/include/Makefile.in Fri Dec 21 16:41:48 2007 +0900 +++ b/Wnn/include/Makefile.in Fri Dec 21 17:22:21 2007 +0900 @@ -37,7 +37,7 @@ HEADERS = jllib.h jslib.h rk_spclval.h wnnerror.h commonhd.h cplib.h \ wnn_config.h msg.h -all:: +all:: build_stamp.h instlib:: install @@ -53,5 +53,13 @@ depend:: +build_stamp.h:: + if [ -d ../../.hg ]; then \ + revh=`hg tip --template '#define _SERVER_VERSION "FreeWnn mercurial #rev#:#node|short#"\n' 2>/dev/null`; \ + [ -z "$$revh" ] || echo "$$revh" > build_stamp.h; \ + else \ + echo "FreeWnn 1.1.1" > build_stamp.h; \ + fi + clean:: - + rm -f build_stamp.h
--- a/Wnn/include/commonhd.h Fri Dec 21 16:41:48 2007 +0900 +++ b/Wnn/include/commonhd.h Fri Dec 21 17:22:21 2007 +0900 @@ -39,7 +39,8 @@ #include <stdio.h> #define JSERVER_VERSION 0x4200 /* minor version */ -#define _SERVER_VERSION "FreeWnn mercurial" +//#define _SERVER_VERSION "FreeWnn mercurial" +#include "build_stamp.h" #include "wnnerror.h"