[openib-general] [PATCH 6/10] osm: QoS in OpenSM

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Tue Jan 30 07:31:54 PST 2007


Compilation changes for QoS policy file parser

- Added new files to makefiles.
- Introduced new configuration switch '--enable-maintainer-mode',
  which will run Lex & Yacc instead of just using the generated
  files.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 osm/include/Makefile.am |    2 ++
 osm/opensm/Makefile.am  |   16 +++++++++++++++-
 osm/opensm/configure.in |    4 ++++
 3 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/osm/include/Makefile.am b/osm/include/Makefile.am
index 5efc11a..2b5a17e 100644
--- a/osm/include/Makefile.am
+++ b/osm/include/Makefile.am
@@ -87,6 +87,8 @@ EXTRA_DIST = \
 	$(srcdir)/opensm/osm_drop_mgr.h \
 	$(srcdir)/opensm/osm_port_info_rcv.h \
 	$(srcdir)/opensm/osm_state_mgr_ctrl.h \
+	$(srcdir)/opensm/osm_qos_parser.h \
+	$(srcdir)/opensm/osm_qos_parser_y.h \
 	$(srcdir)/complib/cl_thread_osd.h \
 	$(srcdir)/complib/cl_packon.h \
 	$(srcdir)/complib/cl_atomic_osd.h \
diff --git a/osm/opensm/Makefile.am b/osm/opensm/Makefile.am
index b1028d8..5898d66 100644
--- a/osm/opensm/Makefile.am
+++ b/osm/opensm/Makefile.am
@@ -56,7 +56,21 @@ opensm_SOURCES = main.c osm_console.c os
 		 osm_trap_rcv.c osm_ucast_mgr.c osm_ucast_updn.c \
 		 osm_ucast_file.c osm_ucast_ftree.c \
 		 osm_vl15intf.c osm_vl_arb_rcv.c \
-		 st.c
+		 st.c \
+		 osm_qos_parser_y.c osm_qos_parser_l.c osm_qos_parser.c
+
+osm_qos_parser_y.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/osm_qos_parser.y
+	$(YACC) -y -d $(srcdir)/osm_qos_parser.y
+	mv y.tab.c osm_qos_parser_y.c
+	mv y.tab.h osm_qos_parser_y.h
+	cp -f osm_qos_parser_y.c $(srcdir)/
+	cp -f osm_qos_parser_y.h $(srcdir)/../include/opensm/
+
+osm_qos_parser_l.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/osm_qos_parser.l
+	$(LEX) $(srcdir)/osm_qos_parser.l
+	mv lex.yy.c osm_qos_parser_l.c
+	cp -f osm_qos_parser_l.c $(srcdir)/
+
 if OSMV_OPENIB
 opensm_CFLAGS = -Wall $(OSMV_CFLAGS) -fno-strict-aliasing -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
 opensm_CXXFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
diff --git a/osm/opensm/configure.in b/osm/opensm/configure.in
index 893e3b1..01340a5 100644
--- a/osm/opensm/configure.in
+++ b/osm/opensm/configure.in
@@ -14,6 +14,8 @@ if test -z $opensm_api_version; then
 fi
 AC_SUBST(opensm_api_version)
 
+AM_MAINTAINER_MODE
+
 dnl Checks for programs
 AC_PROG_CXX
 AC_PROG_CC
@@ -22,6 +24,8 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
+AC_PROG_LEX
+AC_PROG_YACC
 
 dnl Checks for libraries
 
-- 
1.4.4.1.GIT






More information about the general mailing list