aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 68a3807..599372a 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -128,8 +128,10 @@ $(SUBDIRS):
# Set V=1 if you want to see everything.
include $(SRC)/Makefile.rules
+GIT_SHA ?= $(shell cd $(SRC); GIT_DIR=$(SRC)/.git git describe --always --dirty 2> /dev/null)
+
gitid.c:
- @echo "const char gitid[] = \"`cd $(SRC); git describe --always --dirty`\";" > $@
+ @echo "const char gitid[] = \"$(GIT_SHA)\";" > $@
include $(shell find $(SRC)/* -name Makefile.check)