# repository), we let git append identification of the actual commit.
PACKAGE=notmuch
+IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
+
VERSION:=$(shell cat version)
ifneq ($(MAKECMDGOALS),release)
ifneq ($(MAKECMDGOALS),release-message)
-VERSION:=$(shell if git describe > /dev/null 2>&1; then git describe --match '[0-9.]*'; else cat version; fi)
+ifeq ($(IS_GIT),yes)
+VERSION:=$(shell git describe --match '[0-9.]*')
+endif
endif
endif
.PHONY: verify-no-dirty-code
verify-no-dirty-code: verify-version
+ifeq ($(IS_GIT),yes)
@printf "Checking that source tree is clean..."
ifneq ($(shell git ls-files -m),)
@echo "No"
else
@echo "Good"
endif
+endif
.PHONY: verify-version
verify-version: