[stgt] [PATCH 5/5] Makefile: allow VERSION to be specified externally

Florian Haas florian.haas at linbit.com
Wed Sep 9 12:28:04 CEST 2009


This allows the RPM spec to set VERSION from the RPM %{version}
field. May be helpful for distro vendors when they package patched
versions of tgt.
---
 tgt.spec     |    2 +-
 usr/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tgt.spec b/tgt.spec
index 087338a..bfc7911 100644
--- a/tgt.spec
+++ b/tgt.spec
@@ -28,7 +28,7 @@ if pkg-config openssl ; then
 fi
 pushd usr
 %{__sed} -i -e 's|-Wall -g -O2|%{optflags}|' Makefile
-%{__make} %{?_smp_mflags} ISCSI=1 ISCSI_RDMA=1
+%{__make} %{?_smp_mflags} ISCSI=1 ISCSI_RDMA=1 VERSION=%{version}
 
 %install
 %{__rm} -rf %{buildroot}
diff --git a/usr/Makefile b/usr/Makefile
index 805ee24..d2eedd6 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,4 +1,4 @@
-VERSION = 0.9.8
+VERSION ?= 0.9.8
 EXTRAVERSION = $(if $(shell git show-ref 2>/dev/null),-git-$(shell git show-ref --head --abbrev|head -1|awk '{print $$1}'))
 
 mandir = /usr/share/man
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list