Fix Makefile `make man` to work w/o .git

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
This commit is contained in:
Andrew Lazarus 2014-11-03 12:01:20 -08:00 committed by Heikki Hokkanen
parent eb812a450d
commit caff4d7d18
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ BINDIR=$(PREFIX)/bin
RESOURCEDIR=$(PREFIX)/share/gitstats
RESOURCES=gitstats.css sortable.js *.gif
BINARIES=gitstats
VERSION=$(shell git describe 2>/dev/null || git rev-parse --short HEAD)
VERSION=$(shell git describe 2>/dev/null || git rev-parse --short HEAD 2>/dev/null || date +%Y-%m-%d)
SEDVERSION=perl -pi -e 's/VERSION = 0/VERSION = "$(VERSION)"/' --
all: help
@ -29,6 +29,6 @@ release:
@$(RM) gitstats.tmp
man:
pod2man --center "User Commands" -r $(shell git rev-parse --short HEAD) doc/gitstats.pod > doc/gitstats.1
pod2man --center "User Commands" -r $(VERSION) doc/gitstats.pod > doc/gitstats.1
.PHONY: all help install release