summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2013-07-25 23:45:45 +0100
committerChad Versace <chad.versace@linux.intel.com>2013-07-29 13:39:29 -0700
commit488b3ed6f40df4608f7d02758ffd4ab7070c782e (patch)
tree2cabb1b1c1da2dd0ef8a25fbb7105d8a44c6987d /SConstruct
parentefb566dff22933517630537c2bfb8da34018ad8c (diff)
downloadexternal_mesa3d-488b3ed6f40df4608f7d02758ffd4ab7070c782e.zip
external_mesa3d-488b3ed6f40df4608f7d02758ffd4ab7070c782e.tar.gz
external_mesa3d-488b3ed6f40df4608f7d02758ffd4ab7070c782e.tar.bz2
build: unify mesa version by using a VERSION file
Rather than having to keep track of all the build systems and their respecitve definition of the mesa version, use a single top file VERSION. Every build system is responsible for reading/parsing the file and using it v2: * remove useless bulletpoint from the documentation, suggested by Matt * "Androing is Linux. Use '/' in stead of '\'", spotted by Chad V * use cleaner code to get the version in scons, suggested by Chad V v3: * ensure leading and trailing whitespace characters are stripped while parsing * android: handle GNU shell commands approapriately Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 3 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index b00a7fe..de735e9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -69,8 +69,10 @@ if env['gles']:
#######################################################################
# Environment setup
+with open("VERSION") as f:
+ mesa_version = f.read().strip()
env.Append(CPPDEFINES = [
- ('PACKAGE_VERSION', '\\"9.3.0-devel\\"'),
+ ('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
])