aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/Makefile
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-12 08:43:13 +0200
committermarha <marha@users.sourceforge.net>2012-06-12 08:43:13 +0200
commit669b562a737c9418c53bfae69c0dbf1aabe318b4 (patch)
tree3689f9b209df6a4b74eb185f202286e435c71538 /mesalib/src/mesa/Makefile
parent59afae8769ef1f757929421e7f55449d5f6b5baf (diff)
parent925b68a7b26823fdfa1cb25d3edc3545fc2175b1 (diff)
downloadvcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.tar.gz
vcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.tar.bz2
vcxsrv-669b562a737c9418c53bfae69c0dbf1aabe318b4.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/Makefile')
-rw-r--r--mesalib/src/mesa/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile
index 05aea8d93..845b524e6 100644
--- a/mesalib/src/mesa/Makefile
+++ b/mesalib/src/mesa/Makefile
@@ -36,6 +36,23 @@ MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS)
# then convenience libs (.a) and finally the device drivers:
default: $(DEPENDS) asm_subdirs $(MESA_LIBS) driver_subdirs
+.PHONY: main/git_sha1.h.tmp
+main/git_sha1.h.tmp:
+ @touch main/git_sha1.h.tmp
+ @if test -d ../../.git; then \
+ if which git > /dev/null; then \
+ git log -n 1 --oneline | \
+ sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
+ > main/git_sha1.h.tmp ; \
+ fi \
+ fi
+
+main/git_sha1.h: main/git_sha1.h.tmp
+ @echo "updating main/git_sha1.h"
+ @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \
+ mv main/git_sha1.h.tmp main/git_sha1.h ;\
+ fi
+
# include glapi_gen.mk for generating glapi headers for GLES
GLAPI := $(TOP)/src/mapi/glapi/gen
include $(GLAPI)/glapi_gen.mk