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>
This commit is contained in:

committed by
Chad Versace

parent
efb566dff2
commit
488b3ed6f4
@@ -33,9 +33,10 @@ endif
|
|||||||
LOCAL_C_INCLUDES += \
|
LOCAL_C_INCLUDES += \
|
||||||
$(MESA_TOP)/include
|
$(MESA_TOP)/include
|
||||||
|
|
||||||
|
MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION)
|
||||||
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-DPACKAGE_VERSION=\"9.3.0-devel\" \
|
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
|
||||||
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
|
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
|
||||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||||
|
|
||||||
|
@@ -36,6 +36,7 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
|||||||
EXTRA_FILES = \
|
EXTRA_FILES = \
|
||||||
aclocal.m4 \
|
aclocal.m4 \
|
||||||
configure \
|
configure \
|
||||||
|
VERSION \
|
||||||
bin/ar-lib \
|
bin/ar-lib \
|
||||||
bin/compile \
|
bin/compile \
|
||||||
bin/config.sub \
|
bin/config.sub \
|
||||||
|
@@ -69,8 +69,10 @@ if env['gles']:
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Environment setup
|
# Environment setup
|
||||||
|
|
||||||
|
with open("VERSION") as f:
|
||||||
|
mesa_version = f.read().strip()
|
||||||
env.Append(CPPDEFINES = [
|
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\\"'),
|
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@@ -6,7 +6,8 @@ dnl Tell the user about autoconf.html in the --help output
|
|||||||
m4_divert_once([HELP_END], [
|
m4_divert_once([HELP_END], [
|
||||||
See docs/autoconf.html for more details on the options for Mesa.])
|
See docs/autoconf.html for more details on the options for Mesa.])
|
||||||
|
|
||||||
AC_INIT([Mesa], [9.3.0-devel],
|
m4_define(MESA_VERSION, m4_normalize(m4_include(VERSION)))
|
||||||
|
AC_INIT([Mesa], [MESA_VERSION],
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||||
AC_CONFIG_AUX_DIR([bin])
|
AC_CONFIG_AUX_DIR([bin])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
@@ -193,15 +193,7 @@ branch is relevant.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3>Verify and update version info</h3>
|
<h3>Verify and update version info in VERSION</h3>
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>SConstruct</dt>
|
|
||||||
<dt>Android.common.mk</dt>
|
|
||||||
<dd>PACKAGE_VERSION</dd>
|
|
||||||
<dt>configure.ac</dt>
|
|
||||||
<dd>AC_INIT</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Create a docs/relnotes/x.y.z.html file.
|
Create a docs/relnotes/x.y.z.html file.
|
||||||
|
Reference in New Issue
Block a user