Previously the version was specified in configure.ac as well as
one of the xa headers. Thus incleasing the risk of discrepancies
when a developer bumps one but forgets about the other.

Currently only automake builds the xa state-tracker + targets,
and we should move the version definitions to a build system
independent file (similar to VERSION) once any of the other two
decide to join the fun.

Cc: Thomas Hellstrom <thellst...@vmware.com>
Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
 src/gallium/state_trackers/xa/Makefile.am  | 6 +++++-
 src/gallium/state_trackers/xa/xa_tracker.h | 4 ----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/xa/Makefile.am 
b/src/gallium/state_trackers/xa/Makefile.am
index 72486b9..d24fcd4 100644
--- a/src/gallium/state_trackers/xa/Makefile.am
+++ b/src/gallium/state_trackers/xa/Makefile.am
@@ -26,7 +26,11 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
        -Wall -pedantic \
        $(GALLIUM_CFLAGS) \
-       $(VISIBILITY_CFLAGS)
+       $(VISIBILITY_CFLAGS) \
+       -DXA_TRACKER_VERSION_MAJOR=$(XA_MAJOR) \
+       -DXA_TRACKER_VERSION_MINOR=$(XA_MINOR) \
+       -DXA_TRACKER_VERSION_PATCH=$(XA_TINY)
+
 
 AM_CPPFLAGS = \
        $(GALLIUM_PIPE_LOADER_DEFINES) \
diff --git a/src/gallium/state_trackers/xa/xa_tracker.h 
b/src/gallium/state_trackers/xa/xa_tracker.h
index 43e56ff..74ee878 100644
--- a/src/gallium/state_trackers/xa/xa_tracker.h
+++ b/src/gallium/state_trackers/xa/xa_tracker.h
@@ -36,10 +36,6 @@
 
 #include <stdint.h>
 
-#define XA_TRACKER_VERSION_MAJOR 2
-#define XA_TRACKER_VERSION_MINOR 1
-#define XA_TRACKER_VERSION_PATCH 0
-
 #define XA_FLAG_SHARED         (1 << 0)
 #define XA_FLAG_RENDER_TARGET  (1 << 1)
 #define XA_FLAG_SCANOUT        (1 << 2)
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to