[Mesa-dev] [PATCH] build: unify mesa version by using a VERSION file
Emil Velikov
emil.l.velikov at gmail.com
Fri Jul 19 16:35:56 PDT 2013
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
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
Hi guys
So here it is, just in time for the 9.3 dev cycle :)
Automake is working fine and scons has been compile tested only - no nouveau
target available to test with ;(
I would appreciate if someone can test the Android build
As usual any comments would be appreciated
Regards
Emil
---
Android.common.mk | 3 ++-
Makefile.am | 1 +
SConstruct | 5 ++++-
VERSION | 1 +
configure.ac | 3 ++-
docs/devinfo.html | 6 +-----
6 files changed, 11 insertions(+), 8 deletions(-)
create mode 100644 VERSION
diff --git a/Android.common.mk b/Android.common.mk
index c6ee4e1..61dc47a 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -33,9 +33,10 @@ endif
LOCAL_C_INCLUDES += \
$(MESA_TOP)/include
+MESA_VERSION=$(cat $(MESA_TOP)\VERSION)
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
LOCAL_CFLAGS += \
- -DPACKAGE_VERSION=\"9.2.0-devel\" \
+ -DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
diff --git a/Makefile.am b/Makefile.am
index 29405a0..a4df949 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,7 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
EXTRA_FILES = \
aclocal.m4 \
configure \
+ VERSION \
bin/ar-lib \
bin/compile \
bin/config.sub \
diff --git a/SConstruct b/SConstruct
index 834e9d5..f401b83 100644
--- a/SConstruct
+++ b/SConstruct
@@ -69,8 +69,11 @@ if env['gles']:
#######################################################################
# Environment setup
+fp = open("VERSION", "r")
+mesa_version = fp.read()
+fp.close()
env.Append(CPPDEFINES = [
- ('PACKAGE_VERSION', '\\"9.2.0-devel\\"'),
+ ('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
])
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..eabee27
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+9.2.0-devel
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 3de0066..55e159d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,8 @@ dnl Tell the user about autoconf.html in the --help output
m4_divert_once([HELP_END], [
See docs/autoconf.html for more details on the options for Mesa.])
-AC_INIT([Mesa], [9.2.0-devel],
+m4_define(MESA_VERSION, m4_include(VERSION))
+AC_INIT([Mesa], [MESA_VERSION],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/docs/devinfo.html b/docs/devinfo.html
index 5aad0fb..60c98f5 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -196,11 +196,7 @@ branch is relevant.
<h3>Verify and update version info</h3>
<dl>
- <dt>SConstruct</dt>
- <dt>Android.common.mk</dt>
- <dd>PACKAGE_VERSION</dd>
- <dt>configure.ac</dt>
- <dd>AC_INIT</dd>
+ <dt>VERSION</dt>
</dl>
<p>
--
1.8.3.3
More information about the mesa-dev
mailing list