summaryrefslogtreecommitdiff
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
parentefb566dff22933517630537c2bfb8da34018ad8c (diff)
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>
-rw-r--r--Android.common.mk3
-rw-r--r--Makefile.am1
-rw-r--r--SConstruct4
-rw-r--r--VERSION1
-rw-r--r--configure.ac3
-rw-r--r--docs/devinfo.html10
6 files changed, 10 insertions, 12 deletions
diff --git a/Android.common.mk b/Android.common.mk
index dd37104b08e..3e6d4c39891 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -33,9 +33,10 @@ endif
33LOCAL_C_INCLUDES += \ 33LOCAL_C_INCLUDES += \
34 $(MESA_TOP)/include 34 $(MESA_TOP)/include
35 35
36MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION)
36# define ANDROID_VERSION (e.g., 4.0.x => 0x0400) 37# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
37LOCAL_CFLAGS += \ 38LOCAL_CFLAGS += \
38 -DPACKAGE_VERSION=\"9.3.0-devel\" \ 39 -DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
39 -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \ 40 -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
40 -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION) 41 -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
41 42
diff --git a/Makefile.am b/Makefile.am
index 63e02c6a0f8..ce391c409a4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,7 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
36EXTRA_FILES = \ 36EXTRA_FILES = \
37 aclocal.m4 \ 37 aclocal.m4 \
38 configure \ 38 configure \
39 VERSION \
39 bin/ar-lib \ 40 bin/ar-lib \
40 bin/compile \ 41 bin/compile \
41 bin/config.sub \ 42 bin/config.sub \
diff --git a/SConstruct b/SConstruct
index b00a7fe1c98..de735e94c34 100644
--- a/SConstruct
+++ b/SConstruct
@@ -69,8 +69,10 @@ if env['gles']:
69####################################################################### 69#######################################################################
70# Environment setup 70# Environment setup
71 71
72with open("VERSION") as f:
73 mesa_version = f.read().strip()
72env.Append(CPPDEFINES = [ 74env.Append(CPPDEFINES = [
73 ('PACKAGE_VERSION', '\\"9.3.0-devel\\"'), 75 ('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
74 ('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'), 76 ('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
75]) 77])
76 78
diff --git a/VERSION b/VERSION
new file mode 100644
index 00000000000..b260649025f
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
9.3.0-devel
diff --git a/configure.ac b/configure.ac
index 425b6eef79d..62d06e0357f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,8 @@ dnl Tell the user about autoconf.html in the --help output
6m4_divert_once([HELP_END], [ 6m4_divert_once([HELP_END], [
7See docs/autoconf.html for more details on the options for Mesa.]) 7See docs/autoconf.html for more details on the options for Mesa.])
8 8
9AC_INIT([Mesa], [9.3.0-devel], 9m4_define(MESA_VERSION, m4_normalize(m4_include(VERSION)))
10AC_INIT([Mesa], [MESA_VERSION],
10 [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) 11 [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
11AC_CONFIG_AUX_DIR([bin]) 12AC_CONFIG_AUX_DIR([bin])
12AC_CONFIG_MACRO_DIR([m4]) 13AC_CONFIG_MACRO_DIR([m4])
diff --git a/docs/devinfo.html b/docs/devinfo.html
index bd11e5ccc1f..bf7725961ce 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -193,15 +193,7 @@ branch is relevant.
193</p> 193</p>
194 194
195 195
196<h3>Verify and update version info</h3> 196<h3>Verify and update version info in VERSION</h3>
197
198<dl>
199 <dt>SConstruct</dt>
200 <dt>Android.common.mk</dt>
201 <dd>PACKAGE_VERSION</dd>
202 <dt>configure.ac</dt>
203 <dd>AC_INIT</dd>
204</dl>
205 197
206<p> 198<p>
207Create a docs/relnotes/x.y.z.html file. 199Create a docs/relnotes/x.y.z.html file.