X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/19f862bdd79fbdba6c857713425e91f8190dadc5..415de53cef9d8477e97fbee65403932cd45ed042:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index 6eaffd4..78d47a4 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,9 @@ PROGS = tig DOCS = tig.1.txt tig.1.html tig.1 README.html ifneq (,$(wildcard .git)) -CFLAGS += '-DVERSION="$(shell git-describe)"' +VERSION = $(shell git-describe) +WTDIRTY = $(shell git-diff-index --name-only HEAD 2>/dev/null) +CFLAGS += '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"' endif all: $(PROGS)