chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68b6e0e
)
Record builds with dirty working tree by appending -dirty to the version
author
Jonas Fonseca
<fonseca@diku.dk>
Sat, 20 May 2006 12:47:23 +0000
(14:47 +0200)
committer
Jonas Fonseca
<fonseca@antimatter.localdomain>
Sat, 20 May 2006 12:47:23 +0000
(14:47 +0200)
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index 6eaffd4634c2e5988f41685a95ebf8f24b6eae3d..78d47a48354e78887ac72139a4d9a7777e4d1b1b 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))
-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)