Skip to content

Commit

Permalink
idl: Move vswitch-idl to libopenvswitch.
Browse files Browse the repository at this point in the history
This is cleaner then having multiple programs build the idl
independently.

Signed-off-by: Ethan Jackson <[email protected]>
  • Loading branch information
ejj committed Mar 19, 2012
1 parent 8a07709 commit 6e037e3
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 23 deletions.
3 changes: 3 additions & 0 deletions lib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
/dirs.c
/coverage-counters.c
/ofp-errors.inc
/vswitch-idl.c
/vswitch-idl.h
/vswitch-idl.ovsidl
17 changes: 16 additions & 1 deletion lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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' \
Expand Down
2 changes: 1 addition & 1 deletion vswitchd/vswitch-idl.ann → lib/vswitch-idl.ann
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# it can generate more programmer-friendly data structures.

s["idlPrefix"] = "ovsrec_"
s["idlHeader"] = "\"vswitchd/vswitch-idl.h\""
s["idlHeader"] = "\"lib/vswitch-idl.h\""
2 changes: 1 addition & 1 deletion utilities/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utilities/ovs-vsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions vswitchd/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@
/ovs-vswitchd.8
/ovs-vswitchd.conf.db.5
/vswitch.ovsschema.stamp
/vswitch-idl.c
/vswitch-idl.h
/vswitch-idl.ovsidl
16 changes: 2 additions & 14 deletions vswitchd/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand All @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion vswitchd/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion vswitchd/ovs-vswitchd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6e037e3

Please sign in to comment.