[ofa-general] [PATCH] opensm: osm_version.h is generated by ./configure

Sasha Khapyorsky sashak at voltaire.com
Sun Sep 23 11:59:15 PDT 2007


include/opensm/osm_version.h file will be generated (from
osm_version.h.in template) by ./configure. In this way we only keep
OpenSM version string in one place (in configure.in).

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/configure.in                    |    2 +-
 opensm/include/Makefile.am             |    1 -
 opensm/include/opensm/osm_version.h    |   60 --------------------------------
 opensm/include/opensm/osm_version.h.in |   60 ++++++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 62 deletions(-)
 delete mode 100644 opensm/include/opensm/osm_version.h
 create mode 100644 opensm/include/opensm/osm_version.h.in

diff --git a/opensm/configure.in b/opensm/configure.in
index cc8cf14..d120c05 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -87,4 +87,4 @@ OPENIB_APP_OSMV_CHECK_LIB
 CFLAGS=$ac_env_CFLAGS_value
 
 dnl Create the following Makefiles
-AC_OUTPUT([Makefile include/Makefile complib/Makefile libvendor/Makefile opensm/Makefile osmeventplugin/Makefile osmtest/Makefile opensm.spec])
+AC_OUTPUT([include/opensm/osm_version.h Makefile include/Makefile complib/Makefile libvendor/Makefile opensm/Makefile osmeventplugin/Makefile osmtest/Makefile opensm.spec])
diff --git a/opensm/include/Makefile.am b/opensm/include/Makefile.am
index ab67446..b2d01fa 100644
--- a/opensm/include/Makefile.am
+++ b/opensm/include/Makefile.am
@@ -4,7 +4,6 @@ SUBDIRS = .
 nobase_pkginclude_HEADERS = iba/ib_types.h iba/ib_cm_types.h
 
 EXTRA_DIST = \
-	$(srcdir)/opensm/osm_version.h \
 	$(srcdir)/opensm/osm_sa_path_record.h \
 	$(srcdir)/opensm/osm_lid_mgr.h \
 	$(srcdir)/opensm/osm_vl_arb_rcv.h \
diff --git a/opensm/include/opensm/osm_version.h b/opensm/include/opensm/osm_version.h
deleted file mode 100644
index 39d5696..0000000
--- a/opensm/include/opensm/osm_version.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _OSM_VERSION_H_
-#define _OSM_VERSION_H_
-
-#ifdef __cplusplus
-#  define BEGIN_C_DECLS extern "C" {
-#  define END_C_DECLS   }
-#else				/* !__cplusplus */
-#  define BEGIN_C_DECLS
-#  define END_C_DECLS
-#endif				/* __cplusplus */
-
-BEGIN_C_DECLS
-/****s* OpenSM: Base/OSM_VERSION
-* NAME
-*	OSM_VERSION
-*
-* DESCRIPTION
-*	The version string for OpenSM
-*
-* SYNOPSIS
-*/
-#define OSM_VERSION "OpenSM 3.1.5"
-/********/
-END_C_DECLS
-#endif				/* _OSM_VERSION_H_ */
diff --git a/opensm/include/opensm/osm_version.h.in b/opensm/include/opensm/osm_version.h.in
new file mode 100644
index 0000000..f5661d0
--- /dev/null
+++ b/opensm/include/opensm/osm_version.h.in
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004-2007 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifndef _OSM_VERSION_H_
+#define _OSM_VERSION_H_
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else				/* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif				/* __cplusplus */
+
+BEGIN_C_DECLS
+/****s* OpenSM: Base/OSM_VERSION
+* NAME
+*	OSM_VERSION
+*
+* DESCRIPTION
+*	The version string for OpenSM
+*
+* SYNOPSIS
+*/
+#define OSM_VERSION "OpenSM @VERSION@"
+/********/
+END_C_DECLS
+#endif				/* _OSM_VERSION_H_ */
-- 
1.5.3.1.91.gd3392




More information about the general mailing list