From: Francois Fleuret Date: Tue, 17 Mar 2009 07:05:19 +0000 (+0100) Subject: Added an automatic computation of the revision number (which is X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7ba212093be8da9d393ad74eeaac47e11370db4;p=selector.git Added an automatic computation of the revision number (which is defined as being the number of "commits" in the git log). --- diff --git a/Makefile b/Makefile index b723ea1..9838c51 100644 --- a/Makefile +++ b/Makefile @@ -23,13 +23,15 @@ LDFLAGS=-lcurses +REVISION_NUMBER=$(shell git log | grep ^commit | wc -l) + ifeq ($(DEBUG),yes) OPTIMIZE_FLAG = -ggdb3 -DDEBUG else OPTIMIZE_FLAG = -ggdb3 -O3 endif -CXXFLAGS = -Wall $(OPTIMIZE_FLAG) +CXXFLAGS = -DREVISION_NUMBER=$(REVISION_NUMBER) -Wall $(OPTIMIZE_FLAG) all: selector