aboutsummaryrefslogtreecommitdiffhomepage
path: root/wscript
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-06-30 15:56:26 +0200
committerGravatar wm4 <wm4@nowhere>2015-06-30 15:56:26 +0200
commitdbf21467f0da3d4906c6854fa7dd13190463c3c3 (patch)
tree6ba8fcba91c34525e13e4675e6cf468c7747cc7c /wscript
parentbf739ca3248c2ce1b0f2ad7c46097c552676e2ba (diff)
build: always regenerate version hash
Until now, it only used the hash from the previous configure run, instead of trying to get the latest hash. The "old" build system did this correctly - we just have to use the existing logic in version.sh. Since waf supports separate build dirs, extend version.sh with an argument for setting the path of version.h.
Diffstat (limited to 'wscript')
-rw-r--r--wscript7
1 files changed, 7 insertions, 0 deletions
diff --git a/wscript b/wscript
index a5566d782f..68c06fb627 100644
--- a/wscript
+++ b/wscript
@@ -911,6 +911,12 @@ def configure(ctx):
ctx.store_dependencies_lists()
+def __write_version__(ctx):
+ import subprocess
+ subprocess.call(["sh", "./version.sh",
+ "--versionh=" + ctx.bldnode.abspath() + "/version.h"],
+ cwd=ctx.srcnode.abspath())
+
def build(ctx):
if ctx.options.variant not in ctx.all_envs:
from waflib import Errors
@@ -918,6 +924,7 @@ def build(ctx):
'The project was not configured: run "waf --variant={0} configure" first!'
.format(ctx.options.variant))
ctx.unpack_dependencies_lists()
+ __write_version__(ctx)
ctx.load('wscript_build')
def init(ctx):