[babl] babl-cache: use babl version in header for releases



commit e6fae3bf6640dfae9b1a080787e768dce4d1fa5f
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Nov 29 22:53:13 2016 +0100

    babl-cache: use babl version in header for releases

 babl/babl-cache.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index 818c126..239bb16 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -138,8 +138,14 @@ static int compare_fish_pixels (const void *a, const void *b)
 static const char *cache_header (void)
 {
   static char buf[2048];
-  sprintf (buf, "#%s BABL_PATH_LENGTH=%d BABL_TOLERANCE=%f",
-  BABL_GIT_VERSION, _babl_max_path_len (), _babl_legal_error ());
+  if (strchr (BABL_GIT_VERSION, ' ')) // we must be building from tarball
+    sprintf (buf, "#%i.%i.%i BABL_PATH_LENGTH=%d BABL_TOLERANCE=%f",
+             BABL_MAJOR_VERSION, BABL_MINOR_VERSION, BABL_MICRO_VERSION,
+             _babl_max_path_len (), _babl_legal_error ());
+  else
+    sprintf (buf, "#%s BABL_PATH_LENGTH=%d BABL_TOLERANCE=%f",
+             BABL_GIT_VERSION,
+             _babl_max_path_len (), _babl_legal_error ());
   return buf;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]