[openib-general] Re: [PATCH] Opensm - using default dir
Sasha Khapyorsky
sashak at voltaire.com
Thu Feb 2 05:31:09 PST 2006
On 18:13 Wed 01 Feb , Hal Rosenstock wrote:
> On Wed, 2006-02-01 at 17:59, Sasha Khapyorsky wrote:
> > On 14:41 Mon 30 Jan , Michael S. Tsirkin wrote:
> > > Quoting r. Yael Kalka <yael at mellanox.co.il>:
> > > > ===================================================================
> > > > --- include/opensm/osm_svn_revision.h (revision 5203)
> > > > +++ include/opensm/osm_svn_revision.h (working copy)
> > > > @@ -1 +1 @@
> > > > -#define OSM_SVN_REVISION ""
> > > > +#define OSM_SVN_REVISION "5203M"
> > >
> > > This looks like a mistake.
> > > And, I think this shows that keeping the generated file osm_svn_revision.h
> > > represents a problem.
> >
> > Good point. Hal, could we svn-remove this file?
>
> Yes, this is possible but there is a little more work involved here as
> the OSM_SVN_REVISION is checked for length 0 to determine whether to
> print out the svn version message right now.
It is ok. What I mean (and believe Michael too) is to not store
osm_svn_revision.h under SVN, but generate in build time. Like this:
--- a/src/userspace/management/osm/opensm/Makefile.am
+++ b/src/userspace/management/osm/opensm/Makefile.am
@@ -12,22 +12,20 @@ endif
if OSMV_OPENIB
.PHONY: always
$(srcdir)/../include/opensm/osm_svn_revision.h: always
- if \
- test '!' -d '$(srcdir)/.svn'; \
- then \
- echo Exported svn revision; \
+ echo -n "#define OSM_SVN_REVISION \"" >$(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
+ if test '!' -d '$(srcdir)/.svn'; then \
+ echo -n "" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
else \
- echo -n "#define OSM_SVN_REVISION \"" >$(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
svnversion -n $(srcdir)/.. >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
- echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
- if cmp -s $(srcdir)/../include/opensm/osm_svn_revision_new.h \
- $(srcdir)/../include/opensm/osm_svn_revision.h ; \
- then \
- rm $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
- else \
- mv $(srcdir)/../include/opensm/osm_svn_revision_new.h \
- $(srcdir)/../include/opensm/osm_svn_revision.h ; \
- fi \
+ fi ; \
+ echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
+ if cmp -s $(srcdir)/../include/opensm/osm_svn_revision_new.h \
+ $(srcdir)/../include/opensm/osm_svn_revision.h ; \
+ then \
+ rm $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
+ else \
+ mv $(srcdir)/../include/opensm/osm_svn_revision_new.h \
+ $(srcdir)/../include/opensm/osm_svn_revision.h ; \
fi
endif
Sasha.
More information about the general
mailing list