diff options
author | Eric Anholt <[email protected]> | 2012-05-14 18:38:54 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-06-11 09:28:00 -0700 |
commit | 07abd913b654a1a04a90db6203a92a14e4ae795a (patch) | |
tree | 39033b607336e60845b695014635ab77a7b6e95b /src | |
parent | 743e505315b6be851618caed61981d7c1617bf45 (diff) |
automake: Move top-level makefile to automake.
This is part of a series to fix our build issues in the automake case
by hooking up the automatic Makefile regeneration support. The
extract_git_sha1 is moved into src/mesa/Makefile so that we get
correct dependency generation.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 05aea8d9307..845b524e6c5 100644 --- a/src/mesa/Makefile +++ b/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 |