Removed the accidental dependency on git to create the waf file

This commit is contained in:
Thomas Nagy 2015-03-01 12:04:11 +01:00
parent 9a72b14976
commit a72bd89be3
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 4 additions and 3 deletions

1
TODO
View File

@ -6,6 +6,7 @@ Waf 1.9
* Remove the split functions from Utils
* Ensure _cache.py are valid python files
* Include the tool 'nobuild' by default
* Support for linkflags/cflags at the end of commands
Waf 1.8.x
---------

View File

@ -73,7 +73,7 @@ def init(ctx):
rev = ctx.cmd_and_log("git rev-parse HEAD").strip()
pats.append(('^WAFREVISION(.*)', 'WAFREVISION="%s"' % rev))
except Exception:
pass
rev = ''
sub_file('waflib/Context.py', pats)
@ -326,9 +326,9 @@ def create_waf(self, *k, **kw):
# when possible, set the git revision in the waf file
bld = self.generator.bld
try:
rev = bld.cmd_and_log("git rev-parse HEAD").strip()
rev = bld.cmd_and_log("git rev-parse HEAD", quiet=0).strip()
except Exception:
pass
rev = ''
else:
reg = re.compile('^GIT(.*)', re.M)
code1 = reg.sub('GIT="%s"' % rev, code1)