From f7e37804586beee663d63b504510fefb28a2953e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 3 Jul 2014 14:45:12 +0200 Subject: add version and verbose output --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4601c7d..8b8b2e6 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,12 @@ VERSION := 0.0.2 all: journal-notify README.html -journal-notify: journal-notify.c +version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile + echo "#ifndef VERSION" > $@ + echo "#define VERSION \"$(shell git describe --tags --long 2>/dev/null || echo ${VERSION})\"" >> $@ + echo "#endif" >> $@ + +journal-notify: journal-notify.c version.h $(CC) $(CFLAGS) -o journal-notify journal-notify.c README.html: README.md -- cgit v1.2.3-54-g00ecf