diff options
-rw-r--r-- | Makefile.main | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main index 68a3807f..599372a5 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) |