From a72bd89be3e9fc5e5dd6e144e4339a1ed7889686 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 1 Mar 2015 12:04:11 +0100 Subject: [PATCH] Removed the accidental dependency on git to create the waf file --- TODO | 1 + wscript | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 80bcffae..aa7e2b9a 100644 --- a/TODO +++ b/TODO @@ -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 --------- diff --git a/wscript b/wscript index 77545082..ff494594 100644 --- a/wscript +++ b/wscript @@ -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)