idl: Move vswitch-idl to libopenvswitch.
authorEthan Jackson <ethan@nicira.com>
Fri, 16 Mar 2012 00:10:41 +0000 (17:10 -0700)
committerEthan Jackson <ethan@nicira.com>
Mon, 19 Mar 2012 17:52:53 +0000 (10:52 -0700)
This is cleaner then having multiple programs build the idl
independently.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/.gitignore
lib/automake.mk
lib/vswitch-idl.ann [new file with mode: 0644]
utilities/automake.mk
utilities/ovs-vsctl.c
vswitchd/.gitignore
vswitchd/automake.mk
vswitchd/bridge.c
vswitchd/ovs-vswitchd.c
vswitchd/vswitch-idl.ann [deleted file]

index 6cbaf30465656c7da9e6aa58c3ad7fb778e847ff..ba73f285ddeb8ffef1a052eb39121cced17281b1 100644 (file)
@@ -4,3 +4,6 @@
 /dirs.c
 /coverage-counters.c
 /ofp-errors.inc
+/vswitch-idl.c
+/vswitch-idl.h
+/vswitch-idl.ovsidl
index 3531ba97ff5abc45e5bfed26b8201eac58ec626d..82bafde22648b7e7cbc91d1d3a70340713a3204a 100644 (file)
@@ -187,7 +187,10 @@ lib_libopenvswitch_a_SOURCES = \
        lib/vlandev.c \
        lib/vlandev.h \
        lib/vlog.c \
-       lib/vlog.h
+       lib/vlog.h \
+       lib/vswitch-idl.c \
+       lib/vswitch-idl.h
+
 nodist_lib_libopenvswitch_a_SOURCES = \
        lib/dirs.c
 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
@@ -269,6 +272,18 @@ MAN_FRAGMENTS += \
        lib/vlog-syn.man \
        lib/vlog.man
 
+# vswitch IDL
+OVSIDL_BUILT += \
+       lib/vswitch-idl.c \
+       lib/vswitch-idl.h \
+       lib/vswitch-idl.ovsidl
+
+EXTRA_DIST += lib/vswitch-idl.ann
+VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
+lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
+       $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
+       mv $@.tmp $@
+
 lib/dirs.c: lib/dirs.c.in Makefile
        ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
                -e 's,[@]srcdir[@],$(srcdir),g' \
diff --git a/lib/vswitch-idl.ann b/lib/vswitch-idl.ann
new file mode 100644 (file)
index 0000000..e8ed743
--- /dev/null
@@ -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"] = "ovsrec_"
+s["idlHeader"] = "\"lib/vswitch-idl.h\""
index 3e66aee1307920bb0874a56a258975c3bfb823b2..0e93ffba84ae60f74916c2367f2bea1e9f5431b8 100644 (file)
@@ -97,7 +97,7 @@ utilities_ovs_ofctl_LDADD = \
        lib/libopenvswitch.a \
        $(SSL_LIBS)
 
-utilities_ovs_vsctl_SOURCES = utilities/ovs-vsctl.c vswitchd/vswitch-idl.c
+utilities_ovs_vsctl_SOURCES = utilities/ovs-vsctl.c
 utilities_ovs_vsctl_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
 
 if HAVE_NETLINK
index db4e91021dffa4b1c8dc6033e4f0b3561f908f01..560d747a29a04f8f0daeb38b88144170cb08fb18 100644 (file)
@@ -41,7 +41,7 @@
 #include "stream-ssl.h"
 #include "sset.h"
 #include "svec.h"
-#include "vswitchd/vswitch-idl.h"
+#include "vswitch-idl.h"
 #include "table.h"
 #include "timeval.h"
 #include "util.h"
index 60bacaf043d58a209a25a37bb8b633b5a5c795af..d5c239b79dcc2dcc058f0d59b7b14675752be7fc 100644 (file)
@@ -6,6 +6,3 @@
 /ovs-vswitchd.8
 /ovs-vswitchd.conf.db.5
 /vswitch.ovsschema.stamp
-/vswitch-idl.c
-/vswitch-idl.h
-/vswitch-idl.ovsidl
index 861c1526304f6d44e3100b46fb5db769904405a0..4df5f22cb57d5f6ea667e8647914b5363d9abf6d 100644 (file)
@@ -13,8 +13,6 @@ vswitchd_ovs_vswitchd_SOURCES = \
        vswitchd/ovs-vswitchd.c \
        vswitchd/system-stats.c \
        vswitchd/system-stats.h \
-       vswitchd/vswitch-idl.c \
-       vswitchd/vswitch-idl.h \
        vswitchd/xenserver.c \
        vswitchd/xenserver.h
 vswitchd_ovs_vswitchd_LDADD = \
@@ -29,25 +27,15 @@ if BUILD_BRCOMPAT
 if HAVE_NETLINK
 sbin_PROGRAMS += vswitchd/ovs-brcompatd
 vswitchd_ovs_brcompatd_SOURCES = \
-       vswitchd/ovs-brcompatd.c \
-       vswitchd/vswitch-idl.c \
-       vswitchd/vswitch-idl.h
+       vswitchd/ovs-brcompatd.c
 vswitchd_ovs_brcompatd_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
 endif
 MAN_ROOTS += vswitchd/ovs-brcompatd.8.in
 endif
 
 # vswitch schema and IDL
-OVSIDL_BUILT += \
-       vswitchd/vswitch-idl.c \
-       vswitchd/vswitch-idl.h \
-       vswitchd/vswitch-idl.ovsidl
-VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema vswitchd/vswitch-idl.ann
-EXTRA_DIST += $(VSWITCH_IDL_FILES)
+EXTRA_DIST += vswitchd/vswitch.ovsschema
 pkgdata_DATA += vswitchd/vswitch.ovsschema
-vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
-       $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
-       mv $@.tmp $@
 
 # vswitch E-R diagram
 #
index 4761cbf01afdd2f1433424a5ce3ffe93eb6a7583..5b6976a2b1c629f0ce1a6a4cfc783dddfdf64a03 100644 (file)
@@ -50,7 +50,7 @@
 #include "util.h"
 #include "unixctl.h"
 #include "vlandev.h"
-#include "vswitchd/vswitch-idl.h"
+#include "vswitch-idl.h"
 #include "xenserver.h"
 #include "vlog.h"
 #include "sflow_api.h"
index 22a26c1cc7d643a2eee9bd99eb85c081a1eb8dca..ebac1aa5cfd4d61f45ae4c871b9207bfca70d43c 100644 (file)
@@ -49,7 +49,7 @@
 #include "util.h"
 #include "vconn.h"
 #include "vlog.h"
-#include "vswitchd/vswitch-idl.h"
+#include "vswitch-idl.h"
 
 VLOG_DEFINE_THIS_MODULE(vswitchd);
 
diff --git a/vswitchd/vswitch-idl.ann b/vswitchd/vswitch-idl.ann
deleted file mode 100644 (file)
index 7a5cc31..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- 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"] = "ovsrec_"
-s["idlHeader"] = "\"vswitchd/vswitch-idl.h\""