[ovs-dev] [PATCH ovn 2/3] ovn: Build "ovn" and "ovn-nb" IDLs.

Justin Pettit jpettit at nicira.com
Wed Mar 11 23:12:53 UTC 2015


Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 ovn/.gitignore     |    6 ++++++
 ovn/automake.mk    |   40 ++++++++++++++++++++++++++++++++++++++++
 ovn/ovn-idl.ann    |    9 +++++++++
 ovn/ovn-nb-idl.ann |    9 +++++++++
 4 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 ovn/ovn-idl.ann
 create mode 100644 ovn/ovn-nb-idl.ann

diff --git a/ovn/.gitignore b/ovn/.gitignore
index f918e1f..011bb1c 100644
--- a/ovn/.gitignore
+++ b/ovn/.gitignore
@@ -3,6 +3,12 @@
 /ovn.pic
 /ovn-architecture.7
 /ovn-controller.8
+/ovn-idl.c
+/ovn-idl.h
+/ovn-idl.ovsidl
 /ovn-nb.5
 /ovn-nb.gv
 /ovn-nb.pic
+/ovn-nb-idl.c
+/ovn-nb-idl.h
+/ovn-nb-idl.ovsidl
diff --git a/ovn/automake.mk b/ovn/automake.mk
index a4951dc..cc1f8ae 100644
--- a/ovn/automake.mk
+++ b/ovn/automake.mk
@@ -75,3 +75,43 @@ SUFFIXES += .xml
 		--version=$(VERSION) $< > $@.tmp && mv $@.tmp $@
 
 EXTRA_DIST += ovn/TODO
+
+# ovn IDL
+OVSIDL_BUILT += \
+	$(srcdir)/ovn/ovn-idl.c \
+	$(srcdir)/ovn/ovn-idl.h \
+	$(srcdir)/ovn/ovn.ovsidl
+EXTRA_DIST += $(srcdir)/ovn/ovn-idl.ann
+OVN_IDL_FILES = \
+	$(srcdir)/ovn/ovn.ovsschema \
+	$(srcdir)/ovn/ovn-idl.ann
+$(srcdir)/ovn/ovn-idl.ovsidl: $(OVN_IDL_FILES)
+	$(AM_V_GEN)$(OVSDB_IDLC) annotate $(OVN_IDL_FILES) > $@.tmp && \
+	mv $@.tmp $@
+CLEANFILES += ovn/ovn-idl.c ovn/ovn-idl.h
+
+# ovn-nb IDL
+OVSIDL_BUILT += \
+	$(srcdir)/ovn/ovn-nb-idl.c \
+	$(srcdir)/ovn/ovn-nb-idl.h \
+	$(srcdir)/ovn/ovn-nb.ovsidl
+EXTRA_DIST += $(srcdir)/ovn/ovn-nb-idl.ann
+OVN_NB_IDL_FILES = \
+	$(srcdir)/ovn/ovn-nb.ovsschema \
+	$(srcdir)/ovn/ovn-nb-idl.ann
+$(srcdir)/ovn/ovn-nb-idl.ovsidl: $(OVN_NB_IDL_FILES)
+	$(AM_V_GEN)$(OVSDB_IDLC) annotate $(OVN_NB_IDL_FILES) > $@.tmp && \
+	mv $@.tmp $@
+CLEANFILES += ovn/ovn-nb-idl.c ovn/ovn-nb-idl.h
+
+# libovn
+lib_LTLIBRARIES += ovn/libovn.la
+ovn_libovn_la_LDFLAGS = \
+        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+        -Wl,--version-script=$(top_builddir)/ovn/libovn.sym \
+        $(AM_LDFLAGS)
+ovn_libovn_la_SOURCES = \
+	ovn/ovn-idl.c \
+	ovn/ovn-idl.h \
+	ovn/ovn-nb-idl.c \
+	ovn/ovn-nb-idl.h
diff --git a/ovn/ovn-idl.ann b/ovn/ovn-idl.ann
new file mode 100644
index 0000000..800b9eb
--- /dev/null
+++ b/ovn/ovn-idl.ann
@@ -0,0 +1,9 @@
+# -*- python -*-
+
+# This code, when invoked by "ovsdb-idlc annotate" (by the build
+# process), annotates vswitch.ovsschema with additional data that give
+# the ovsdb-idl engine information about the types involved, so that
+# it can generate more programmer-friendly data structures.
+
+s["idlPrefix"] = "ovnrec_"
+s["idlHeader"] = "\"ovn/ovn-idl.h\""
diff --git a/ovn/ovn-nb-idl.ann b/ovn/ovn-nb-idl.ann
new file mode 100644
index 0000000..4c38e45
--- /dev/null
+++ b/ovn/ovn-nb-idl.ann
@@ -0,0 +1,9 @@
+# -*- python -*-
+
+# This code, when invoked by "ovsdb-idlc annotate" (by the build
+# process), annotates vswitch.ovsschema with additional data that give
+# the ovsdb-idl engine information about the types involved, so that
+# it can generate more programmer-friendly data structures.
+
+s["idlPrefix"] = "nbrec_"
+s["idlHeader"] = "\"ovn/ovn-nb-idl.h\""
-- 
1.7.5.4




More information about the dev mailing list