X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/e2beda1801cd1be8aa8588b168750b7d85e8c87f..7bb55251674b42b4a0dc91a8072fbd1000306628:/Makefile diff --git a/Makefile b/Makefile index 4d417c5..78d47a4 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ PREFIX = $(HOME) -LDFLAGS = -lcurses +LDLIBS = -lcurses CFLAGS = -Wall -DFLAGS = -g -DDEBUG +DFLAGS = -g -DDEBUG -Werror 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)