From 488b3ed6f40df4608f7d02758ffd4ab7070c782e Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 25 Jul 2013 23:45:45 +0100 Subject: 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 Reviewed-by: Chad Versace Reviewed-by: Kenneth Graunke Signed-off-by: Emil Velikov --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index b00a7fe1c98..de735e94c34 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\\"'), ]) -- cgit v1.2.3