From e2beda1801cd1be8aa8588b168750b7d85e8c87f Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 16 May 2006 17:32:24 +0200 Subject: [PATCH] Only set VERSION to git-describe if .git is available --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c3e2a11..4d417c5 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ 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 -VERSION = $(shell git-describe) + +ifneq (,$(wildcard .git)) +CFLAGS += '-DVERSION="$(shell git-describe)"' +endif all: $(PROGS) all-debug: $(PROGS) -- 2.11.0