diff options
| author | Shawn <shawn@Shawns-Mac-mini.local> | 2011-08-23 03:50:06 -0700 |
|---|---|---|
| committer | Shawn <shawn@Shawns-Mac-mini.local> | 2011-08-23 03:50:06 -0700 |
| commit | 7f56842a792cd6dd83832d123c2580dbb97955fb (patch) | |
| tree | be24a45c147de5aed51ecee7a655ace6b03a2fd7 /Source/Core/Common/SConscript | |
| parent | 5c15292fd8d030107402f4437ad4e8060f9bcf68 (diff) | |
fixup scons (osx) to generate scmrev.h and build.
hopefully this will be the last code change committed directly to master for a while... :/
next is cmake to replace scons on osx hopefully. pointers anyone? (soren?)
Diffstat (limited to 'Source/Core/Common/SConscript')
| -rw-r--r-- | Source/Core/Common/SConscript | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/Common/SConscript b/Source/Core/Common/SConscript index 74eebdd611..f26dfc044c 100644 --- a/Source/Core/Common/SConscript +++ b/Source/Core/Common/SConscript @@ -4,16 +4,16 @@ Import('env') import os import sys -def createVersion(env, target, source): - tmpstr = open(source[0].path, 'r').read().\ - replace("$WCMODS?$WCREV$M:$WCREV$$", env['svnrev']) - outfile = open(target[0].path, 'w') - outfile.write(tmpstr + '\n') - outfile.close() +out_contents =\ + '#define SCM_REV_STR "' + env['gitrev'] + '"\n' +\ + '#define SCM_DESC_STR "' + env['gitdesc'] + '"\n' +\ + '#define SCM_BRANCH_STR "' + env['gitbranch'] + '"\n' +\ + '#define SCM_IS_MASTER ' + ('1' if env['gitbranch'] == 'master' else '0') + '\n\n' -Execute(Delete('Src/svnrev.h')) -env.Command('Src/svnrev.h', 'Src/svnrev_template.h', - [Delete('${TARGET.srcpath}'), createVersion]) +Execute(Delete('Src/scmrev.h')) +outfile = open('Src/scmrev.h', 'w') +outfile.write(out_contents) +outfile.close() files = [ 'Src/ABI.cpp', |
