mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-21 07:24:22 +00:00
Makefile, scst: Add revision to SCST version macro
Add SCST revision to SCST_VERSION_STRING macro. This might be useful for issues reporting/investigation.
This commit is contained in:
@@ -70,9 +70,17 @@ EMULEX_DIR=emulex
|
||||
|
||||
ISCSI_DIR=iscsi-scst
|
||||
|
||||
REVISION ?= $(shell if [ -e .git ]; then echo -n .; git rev-parse --short HEAD 2>/dev/null; fi)
|
||||
SCST_GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
|
||||
REVISION ?= $(SCST_GIT_COMMIT)
|
||||
export REVISION
|
||||
|
||||
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)
|
||||
ifneq (, $(REVISION))
|
||||
VERSION := $(VERSION_WITHOUT_REVISION).$(REVISION)
|
||||
else
|
||||
VERSION := $(VERSION_WITHOUT_REVISION)
|
||||
endif
|
||||
DEBIAN_REVISION=1.1
|
||||
RPMTOPDIR ?= $(shell if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
|
||||
else echo $$PWD/rpmbuilddir; fi)
|
||||
|
||||
Reference in New Issue
Block a user