mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 01:01:27 +00:00
Makefile, scstadmin/Makefile: Omit the revision number dot if the source files are not under source control
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7817 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
10
Makefile
10
Makefile
@@ -54,11 +54,13 @@ EMULEX_DIR=emulex
|
||||
|
||||
ISCSI_DIR=iscsi-scst
|
||||
|
||||
REVISION ?= $(shell if svn info >/dev/null 2>&1; \
|
||||
then svn info | sed -n 's/^Revision:[[:blank:]]*//p';\
|
||||
else git log | grep -c ^commit; \
|
||||
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)
|
||||
VERSION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h).$(REVISION)")
|
||||
VERSION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)$(REVISION)")
|
||||
DEBIAN_REVISION=1
|
||||
|
||||
help:
|
||||
|
||||
@@ -2,11 +2,13 @@ ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
|
||||
REVISION ?= $(shell if svn info >/dev/null 2>&1; \
|
||||
then svn info | sed -n 's/^Revision:[[:blank:]]*//p';\
|
||||
else git log | grep -c ^commit; \
|
||||
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)
|
||||
VERSION = $(shell echo -n "$$(sed -n 's/^[[:blank:]]*\$$VERSION[[:blank:]]*=[[:blank:]]*[\"'"'"']\([0-9.]*\)[\"'"'"'];$$/\1/p' scstadmin/scst-*/lib/SCST/SCST.pm).$(REVISION)")
|
||||
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 \
|
||||
rm -f scstadmin; \
|
||||
|
||||
Reference in New Issue
Block a user