SvnRevision.h: @if [ -d .svn ]; then \ ( \ echo "//////////////////////////////////////////////////////////////////////////////"; \ echo "//"; \ echo "//////////////////////////////////////////////////////////////////////////////"; \ echo ""; \ echo "#ifndef _SVN_REVISION_H_"; \ echo "#define _SVN_REVISION_H_"; \ echo ""; \ echo "// Increase the svn version number when compiling, the file cannot be uploaded to the svn source library"; \ echo -n '#define SVN_REVISION_NUM "'; \ (cd ..; svnversion -nc .); \ echo '"'; \ echo -n '#define SVN_URL "'; \ (cd ..; echo -n `svn info|grep URL`|sed 's/URL: //'); \ echo '"'; \ echo -n '#define BUILD_TIME "'; \ (echo -n `date "+%x %X"`); \ echo '"'; \ echo -n '#define BUILD_BY "'; \ (echo -n `whoami`); \ echo '"'; \ echo -n '#define BUILD_AT "'; \ (echo -n `hostname`); \ echo '"'; \ echo ""; \ echo "#endif // _SVN_REVISION_H_"; \ ) > SvnRevision.h; \ echo "Marking subversion revision to SvnRevision.h..."; \ be; GitRevision.h: ( \ echo "//////////////////////////////////////////////////////////////////////////////"; \ echo "//"; \ echo "//////////////////////////////////////////////////////////////////////////////"; \ echo ""; \ echo "#ifndef _Git_REVISION_H_"; \ echo "#define _Git_REVISION_H_"; \ echo ""; \ echo -n '#define Git_REVISION_NUM "'; \ (echo -n `git log | head -1`); \ echo '"'; \ echo -n '#define BUILD_TIME "'; \ (echo -n `date "+%x %X"`); \ echo '"'; \ echo -n '#define BUILD_BY "'; \ (echo -n `whoami`); \ echo '"'; \ echo -n '#define BUILD_AT "'; \ (echo -n `hostname`); \ echo '"'; \ echo ""; \ echo "#endif // _Git_REVISION_H_"; \ ) > GitRevision.h; \ echo "Marking subversion revision to GitRevision.h..."; \