From: Ethan Jackson Date: Fri, 16 Mar 2012 00:10:41 +0000 (-0700) Subject: idl: Move vswitch-idl to libopenvswitch. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e037e3ca6381fa36fdf6009c4ccc97d0f041be4;p=openvswitch idl: Move vswitch-idl to libopenvswitch. This is cleaner then having multiple programs build the idl independently. Signed-off-by: Ethan Jackson --- diff --git a/lib/.gitignore b/lib/.gitignore index 6cbaf304..ba73f285 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -4,3 +4,6 @@ /dirs.c /coverage-counters.c /ofp-errors.inc +/vswitch-idl.c +/vswitch-idl.h +/vswitch-idl.ovsidl diff --git a/lib/automake.mk b/lib/automake.mk index 3531ba97..82bafde2 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -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 index 00000000..e8ed743b --- /dev/null +++ b/lib/vswitch-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"] = "ovsrec_" +s["idlHeader"] = "\"lib/vswitch-idl.h\"" diff --git a/utilities/automake.mk b/utilities/automake.mk index 3e66aee1..0e93ffba 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -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 diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index db4e9102..560d747a 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -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" diff --git a/vswitchd/.gitignore b/vswitchd/.gitignore index 60bacaf0..d5c239b7 100644 --- a/vswitchd/.gitignore +++ b/vswitchd/.gitignore @@ -6,6 +6,3 @@ /ovs-vswitchd.8 /ovs-vswitchd.conf.db.5 /vswitch.ovsschema.stamp -/vswitch-idl.c -/vswitch-idl.h -/vswitch-idl.ovsidl diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk index 861c1526..4df5f22c 100644 --- a/vswitchd/automake.mk +++ b/vswitchd/automake.mk @@ -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 # diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 4761cbf0..5b6976a2 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -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" diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 22a26c1c..ebac1aa5 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -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 index 7a5cc314..00000000 --- a/vswitchd/vswitch-idl.ann +++ /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\""