diff --git a/Makefile b/Makefile index a38b9b6f2..acd2415d7 100644 --- a/Makefile +++ b/Makefile @@ -70,12 +70,7 @@ EMULEX_DIR=emulex ISCSI_DIR=iscsi-scst -REVISION ?= $(shell if [ -e .svn ]; then \ - svn info | sed -n 's/^Revision:[[:blank:]]*/./p'; \ - elif [ -e .git ]; then \ - echo -n .; \ - git log | grep -c ^commit; \ - fi) +REVISION ?= $(shell if [ -e .git ]; then echo -n .; git rev-parse --short HEAD 2>/dev/null; fi) VERSION_WITHOUT_REVISION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)") VERSION := $(VERSION_WITHOUT_REVISION)$(REVISION) DEBIAN_REVISION=1.1 diff --git a/scstadmin/Makefile b/scstadmin/Makefile index 5d962ea96..a84c54192 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -2,12 +2,7 @@ ifndef PREFIX PREFIX=/usr/local endif -REVISION ?= $(shell if [ -e .svn ]; then \ - svn info | sed -n 's/^Revision:[[:blank:]]*/./p'; \ - elif [ -e .git ]; then \ - echo -n .; \ - git log | grep -c ^commit; \ - fi) +REVISION ?= $(shell if [ -e .git ]; then echo -n .; git rev-parse --short HEAD 2>/dev/null; fi) VERSION = $(shell echo -n "$$(sed -n 's/^[[:blank:]]*\$$VERSION[[:blank:]]*=[[:blank:]]*[\"'"'"']\([0-9.]*\)[\"'"'"'];$$/\1/p' scstadmin/scst-*/lib/SCST/SCST.pm)$(REVISION)") SCSTADMIN_DIR = $(shell if [ ! -h scstadmin ]; then \