Embed svn revision number into code

BUG=
TEST=build on linux
Review URL: https://webrtc-codereview.appspot.com/516001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2104 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@webrtc.org 2012-04-24 14:50:50 +00:00
parent b28b43a66f
commit 48a5df6481
3 changed files with 7 additions and 2 deletions

View File

@ -95,6 +95,11 @@
'include_dirs': [ 'include_dirs': [
'..','../..', # common_types.h, typedefs.h '..','../..', # common_types.h, typedefs.h
], ],
'defines': [
# TODO(leozwang): Most of team use git-svn, need to add
# git-svn support as well.
'WEBRTC_SVNREVISION="<!(svnversion -n)"',
],
'conditions': [ 'conditions': [
['build_with_chromium==1', { ['build_with_chromium==1', {
'defines': [ 'defines': [

View File

@ -440,7 +440,7 @@ int ViEBaseImpl::LastError() {
} }
WebRtc_Word32 ViEBaseImpl::AddBuildInfo(char* str) const { WebRtc_Word32 ViEBaseImpl::AddBuildInfo(char* str) const {
return sprintf(str, "Build: %s\n", BUILDINFO); return sprintf(str, "Build: svn:%s %s\n", WEBRTC_SVNREVISION, BUILDINFO);
} }
WebRtc_Word32 ViEBaseImpl::AddViEVersion(char* str) const { WebRtc_Word32 ViEBaseImpl::AddViEVersion(char* str) const {

View File

@ -1288,7 +1288,7 @@ int VoEBaseImpl::GetVersion(char version[1024])
WebRtc_Word32 VoEBaseImpl::AddBuildInfo(char* str) const WebRtc_Word32 VoEBaseImpl::AddBuildInfo(char* str) const
{ {
return sprintf(str, "Build: %s\n", BUILDINFO); return sprintf(str, "Build: svn:%s %s\n", WEBRTC_SVNREVISION, BUILDINFO);
} }
WebRtc_Word32 VoEBaseImpl::AddVoEVersion(char* str) const WebRtc_Word32 VoEBaseImpl::AddVoEVersion(char* str) const