Use perl for version number replacement.

This patch changes Makefile to use perl for version number replacement to fix
'make install' on Darwin. The problem is that GNU sed and sed on Darwin (and
probably on BSDs) behave differently with regards to the '-i' command line
option.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
master
Pekka Enberg 2010-09-28 17:20:41 +03:00 committed by Heikki Hokkanen
parent 9473138e28
commit dc0bbb2957
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ RESOURCEDIR=$(PREFIX)/share/gitstats
RESOURCES=gitstats.css sortable.js *.gif
BINARIES=gitstats
VERSION=$(shell git describe 2>/dev/null || git rev-parse --short HEAD)
SEDVERSION=sed -i 's/VERSION = 0/VERSION = "$(VERSION)"/'
SEDVERSION=perl -pi -e 's/VERSION = 0/VERSION = "$(VERSION)"/' --
all: help