[ofa-general] ***SPAM*** [PATCH] infiniband-diags: update version according to the tree state
Sasha Khapyorsky
sashak at voltaire.com
Sun Jan 6 18:23:21 PST 2008
Update the version according to the tree state. Similar to OpenSM
version update.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
infiniband-diags/Makefile.am | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/infiniband-diags/Makefile.am b/infiniband-diags/Makefile.am
index 8e1e587..ca66e2d 100644
--- a/infiniband-diags/Makefile.am
+++ b/infiniband-diags/Makefile.am
@@ -91,6 +91,18 @@ man_MANS = man/ibaddr.8 man/ibcheckerrors.8 man/ibcheckerrs.8 \
man/ibdatacounts.8 man/ibdatacounters.8 \
man/ibrouters.8 man/ibprintrt.8 man/ibidsverify.8
+BUILT_SOURCES = ibdiag_version
+ibdiag_version:
+ if [ -x $(top_srcdir)/../gen_ver.sh ] ; then \
+ ver_file=$(srcdir)/include/ibdiag_version.h ; \
+ ibdiag_ver=`cat $$ver_file | sed -ne '/#define IBDIAG_VERSION /s/^.*\"\(.*\)\"$$/\1/p'` ; \
+ ver=`$(top_srcdir)/../gen_ver.sh $(PACKAGE)` ; \
+ if [ $$ver != $$ibdiag_ver ] ; then \
+ cat $$ver_file | sed -e '/#define IBDIAG_VERSION /s/\".*\"/\"'$$ver'\"/' > tmp_new_version ; \
+ cat tmp_new_version > $$ver_file && rm -f tmp_new_version ; \
+ fi ; \
+ fi
+
EXTRA_DIST = scripts include infiniband-diags.spec.in infiniband-diags.spec \
$(man_MANS) autogen.sh
--
1.5.4.rc2.38.gd6da3
More information about the general
mailing list