~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only set VERSION to git-describe if .git is available
[tig]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
c3e2a11
..
4d417c5
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,10
+1,13
@@
PREFIX = $(HOME)
LDFLAGS = -lcurses
PREFIX = $(HOME)
LDFLAGS = -lcurses
-CFLAGS =
'-DVERSION="$(VERSION)"'
-Wall
+CFLAGS = -Wall
DFLAGS = -g -DDEBUG
PROGS = tig
DOCS = tig.1.txt tig.1.html tig.1 README.html
DFLAGS = -g -DDEBUG
PROGS = tig
DOCS = tig.1.txt tig.1.html tig.1 README.html
-VERSION = $(shell git-describe)
+
+ifneq (,$(wildcard .git))
+CFLAGS += '-DVERSION="$(shell git-describe)"'
+endif
all: $(PROGS)
all-debug: $(PROGS)
all: $(PROGS)
all-debug: $(PROGS)