~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Record builds with dirty working tree by appending -dirty to the version
[tig]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
6eaffd4
..
78d47a4
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-6,7
+6,9
@@
PROGS = tig
DOCS = tig.1.txt tig.1.html tig.1 README.html
ifneq (,$(wildcard .git))
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)
endif
all: $(PROGS)