[openib-general] [PATCH] osm: support osm_svn_revision.h in case of SVN export

Eitan Zahavi eitan at mellanox.co.il
Mon Jan 30 05:23:43 PST 2006


Hi Hal

We are using SVN export when building standalone OpenSM packages.
During the SVN export we overwrite the osm_svn_revision.h with the 
SVN version used for the export.

However the makefile override that. This patch avoids this by checking 
if the svnversion is "exported".

Eitan

Signed-off-by:  Eitan Zahavi <eitan at mellanox.co.il>
Index: opensm/Makefile.am
===================================================================
--- opensm/Makefile.am	(revision 5202)
+++ opensm/Makefile.am	(working copy)
@@ -13,7 +13,12 @@ if OSMV_OPENIB
 $(srcdir)/../include/opensm/osm_svn_revision_new.h:
 	echo -n "#define OSM_SVN_REVISION \"" >$(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
 	svnversion $(srcdir)/.. | tr -d '\n' >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h
+	echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h; \
+	if test `cat $(srcdir)/../include/opensm/osm_svn_revision_new.h | grep exported | wc -l` = 1; \
+   then \
+	   cp $(srcdir)/../include/opensm/osm_svn_revision.h \
+			$(srcdir)/../include/opensm/osm_svn_revision_new.h; \
+	fi
 
 $(srcdir)/../include/opensm/osm_svn_revision.h: $(srcdir)/../include/opensm/osm_svn_revision_new.h
 	if cmp -s $(srcdir)/../include/opensm/osm_svn_revision_new.h \




More information about the general mailing list