--- /dev/null
+#!/usr/bin/make -sf
+# Print the various Mesa version fields. This is mostly used to add the
+# version to configure.
+
+# This reflects that this script is usually called from the toplevel
+TOP = .
+
+include $(TOP)/configs/default
+
+version:
+ @echo $(MESA_VERSION)
+major:
+ @echo $(MESA_MAJOR)
+minor:
+ @echo $(MESA_MINOR)
+tiny:
+ @echo $(MESA_TINY)
MESA_MAJOR=7
MESA_MINOR=1
MESA_TINY=0
+MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
AC_PREREQ(2.59)
-dnl Versioning
-dnl Make version number available to autoconf and configure
-m4_define([mesa_version],[7.1.0])
+dnl Versioning - scrape the version from configs/default
+m4_define([mesa_version],
+ [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])])
+m4_ifval(mesa_version,[],[
+ m4_errprint([Error: Failed to get the Mesa version from the output of
+ running `make -f bin/version.mk version'
+])
+ m4_exit([1])
+])
-AC_INIT([Mesa],[mesa_version()],
+AC_INIT([Mesa],[mesa_version],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR(bin)
AC_CANONICAL_HOST
<p>
Edit the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in
-configs/default and configure.ac.
+configs/default.
</p>
<p>
-Make sure the values in src/mesa/main/version.h is correct.
+Make sure the values in src/mesa/main/version.h are correct.
</p>
<p>