svnversion $SRC_DIR is what you want.. [EMAIL PROTECTED]:/usr/src/openib-src/userspace/management$ svnversion . 5188:5193
On Thu, Jan 26, 2006 at 10:38:21PM +0200, Eitan Zahavi wrote: > Hi Troy, > > I think it got forgotten as I proposed using standard svn command to > extract the version. > I do not recall exactly where we have left it. I remember someone > proposed a standard svn command to extract that. > Sorry about that. We all would like to get that information too. > > Eitan > > > -----Original Message----- > > From: Troy Benjegerdes [mailto:[EMAIL PROTECTED] > > Sent: Thursday, January 26, 2006 9:38 PM > > To: Eitan Zahavi; [email protected] > > Cc: Hal Rosenstock > > Subject: Re: [openib-general] [PATCH] OpenSM: include OpenIB svn > version when > > OpenIB build > > > > Is there a good reason that this patche hasn't been applied yet?? > > > > If you want me to provide usefull debugging reports, I need to be able > > to tell from the log which SVN version opensm was built from. > > > > On Tue, Jan 03, 2006 at 12:43:33PM -0500, Hal Rosenstock wrote: > > > OpenSM: include OpenIB svn version when OpenIB build > > > > > > Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]> > > > > > > Index: osm_opensm.c > > > =================================================================== > > > --- osm_opensm.c (revision 4716) > > > +++ osm_opensm.c (working copy) > > > @@ -59,6 +59,9 @@ > > > #include <complib/cl_passivelock.h> > > > #include <vendor/osm_vendor_api.h> > > > #include <opensm/osm_version.h> > > > +#ifdef OSM_VENDOR_INTF_OPENIB > > > +#include <opensm/osm_svn_revision.h> > > > +#endif > > > #include <opensm/osm_base.h> > > > #include <opensm/osm_opensm.h> > > > #include <opensm/osm_log.h> > > > @@ -206,12 +209,33 @@ osm_opensm_init( > > > if( status != IB_SUCCESS ) > > > return ( status ); > > > > > > +#ifndef OSM_VENDOR_INTF_OPENIB > > > /* If there is a log level defined - add the OSM_VERSION to it. > */ > > > osm_log( &p_osm->log, > > > osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ 0xFF > ), "%s\n", > > > OSM_VERSION ); > > > /* Write the OSM_VERSION to the SYS_LOG */ > > > osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION ); /* > Format > > Waived */ > > > +#else > > > + if (strlen(OSM_SVN_REVISION)) > > > + { > > > + /* If there is a log level defined - add OSM_VERSION and > > OSM_SVN_REVISION to it. */ > > > + osm_log( &p_osm->log, > > > + osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ > 0xFF ), "%s > > OpenIB svn %s\n", > > > + OSM_VERSION, OSM_SVN_REVISION ); > > > + /* Write the OSM_VERSION and OSM_SVN_REVISION to the SYS_LOG > */ > > > + osm_log( &p_osm->log, OSM_LOG_SYS, "%s OpenIB svn %s\n", > > OSM_VERSION, OSM_SVN_REVISION ); /* Format Waived */ > > > + } > > > + else > > > + { > > > + /* If there is a log level defined - add the OSM_VERSION to > it. */ > > > + osm_log( &p_osm->log, > > > + osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ > 0xFF ), "%s\n", > > > + OSM_VERSION ); > > > + /* Write the OSM_VERSION to the SYS_LOG */ > > > + osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION ); > /* Format > > Waived */ > > > + } > > > +#endif > > > > > > osm_log( &p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: [\n" ); > /* Format > > Waived */ > > > > > > Index: main.c > > > =================================================================== > > > --- main.c (revision 4716) > > > +++ main.c (working copy) > > > @@ -57,6 +57,9 @@ > > > #include <getopt.h> > > > #include <unistd.h> > > > #include <opensm/osm_version.h> > > > +#ifdef OSM_VENDOR_INTF_OPENIB > > > +#include <opensm/osm_svn_revision.h> > > > +#endif > > > #include <opensm/osm_opensm.h> > > > #include <complib/cl_types.h> > > > #include <complib/cl_debug.h> > > > @@ -522,6 +525,10 @@ main( > > > > > > printf("-------------------------------------------------\n"); > > > printf("%s\n", OSM_VERSION); > > > +#if defined ( OSM_VENDOR_INTF_OPENIB ) > > > + if (strlen(OSM_SVN_REVISION)) > > > + printf("Based on OpenIB svn %s\n", OSM_SVN_REVISION); > > > +#endif > > > > > > osm_subn_set_default_opt(&opt); > > > osm_subn_parse_conf_file(&opt); > > > Index: Makefile.am > > > =================================================================== > > > --- Makefile.am (revision 4716) > > > +++ Makefile.am (working copy) > > > @@ -9,6 +9,22 @@ else > > > DBGFLAGS = -g -O2 > > > endif > > > > > > +if OSMV_OPENIB > > > +$(srcdir)/../include/opensm/osm_svn_revision.h: > > > + if test -f $(srcdir)/../.svn/entries; then \ > > > + grep revision $(srcdir)/../.svn/entries | sed > 's/revision=/#define > > OSM_SVN_REVISION /' | sed 's/\/>//' > > >$(srcdir)/../include/opensm/osm_svn_revision.h; \ > > > + else \ > > > + echo "#define OSM_SVN_REVISION \"\"" > > >$(srcdir)/../include/opensm/osm_svn_revision.h; \ > > > + fi > > > + > > > +main.c: $(srcdir)/../include/opensm/osm_svn_revision.h > > > + if test -f $(srcdir)/../include/opensm/osm_svn_revision.h; then > \ > > > + if test -f $(srcdir)/../.svn/entries; then \ > > > + grep revision $(srcdir)/../.svn/entries | sed > 's/revision=/#define > > OSM_SVN_REVISION /' | sed 's/\/>//' > > >$(srcdir)/../include/opensm/osm_svn_revision.h; \ > > > + fi \ > > > + fi > > > +endif > > > + > > > libopensm_la_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT > > $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 > > > > > > if HAVE_LD_VERSION_SCRIPT > > > > > > -- -------------------------------------------------------------------------- Troy Benjegerdes 'da hozer' [EMAIL PROTECTED] Somone asked me why I work on this free (http://www.fsf.org/philosophy/) software stuff and not get a real job. Charles Shultz had the best answer: "Why do musicians compose symphonies and poets write poems? They do it because life wouldn't have any meaning for them if they didn't. That's why I draw cartoons. It's my life." -- Charles Shultz _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
