X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=inline;f=Makefile.local;h=b338d8b2a2d26640cc781091ee9c22ec77c11c82;hb=b8f0646931a391062ae58796dad53b70abe25e64;hp=aefbb9e811ff38d66ca96e6f9af33f76792ed248;hpb=5999ff8d3cce4512486353784f9dec5242196ec1;p=notmuch diff --git a/Makefile.local b/Makefile.local index aefbb9e8..b338d8b2 100644 --- a/Makefile.local +++ b/Makefile.local @@ -10,10 +10,14 @@ # 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 @@ -126,6 +130,7 @@ release-message: .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" @@ -139,6 +144,7 @@ ifneq ($(shell git ls-files -m),) else @echo "Good" endif +endif .PHONY: verify-version verify-version: