From addb099ce83c9b9909966a5cd364b85cedef1ee1 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 21 Jun 2016 17:43:35 +0100 Subject: anv: use cache uuid based on the build timestamp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not rely on the git sha1: - its current truncated form makes it less unique - it does not attribute for local (Vulkand or otherwise) changes Use a timestamp produced at the time of build. It's perfectly unique, unless someone explicitly thinkers with their system clock. Even then chances of producing the exact same one are very small, if not zero. v2: Remove .tmp rule. Its not needed since we want for the header to be regenerated on each time we call make (Eric). v3: - Honour SOURCE_DATE_EPOCH, to make the build reproducible (Michel) - Replace the generated header with a define, to prevent needless builds on consecutive `make' and/or `make install' calls. (Dave) v4: - Keep the timestamp generation at make time. (Jason) v5: - Ensure that file is regenerated on incremental builds. Cc: Michel Dänzer Cc: Dave Airlie Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov Reviewed-by: Jason Ekstrand --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8321e8e..3d32c53 100644 --- a/configure.ac +++ b/configure.ac @@ -2620,6 +2620,8 @@ AC_SUBST([XA_MINOR], $XA_MINOR) AC_SUBST([XA_TINY], $XA_TINY) AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY") +AC_SUBST([TIMESTAMP_CMD], '`test $(SOURCE_DATE_EPOCH) && echo $(SOURCE_DATE_EPOCH) || date +%s`') + AC_ARG_ENABLE(valgrind, [AS_HELP_STRING([--enable-valgrind], [Build mesa with valgrind support (default: auto)])], -- cgit v1.1