Skip to content

Commit

Permalink
vtep: Move vtep IDL files into new "libvtep.la".
Browse files Browse the repository at this point in the history
There's no reason to build it in "lib" and include it in
"libopenvswitch.la".  This commit moves it to "vtep" and includes it in
a new "libvtep.la".

Signed-off-by: Justin Pettit <[email protected]>
  • Loading branch information
Justin Pettit committed Mar 5, 2015
1 parent 8f07d90 commit 9d82156
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
3 changes: 0 additions & 3 deletions lib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@
/vswitch-idl.c
/vswitch-idl.h
/vswitch-idl.ovsidl
/vtep-idl.c
/vtep-idl.h
/vtep-idl.ovsidl
/libopenvswitch.pc
/libsflow.pc
15 changes: 1 addition & 14 deletions lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/vlog.c \
lib/vswitch-idl.c \
lib/vswitch-idl.h \
lib/vtep-idl.c \
lib/vtep-idl.h \
lib/lldp/aa-structs.h \
lib/lldp/lldp.c \
lib/lldp/lldp-const.h \
Expand Down Expand Up @@ -436,10 +434,7 @@ MAN_FRAGMENTS += \
OVSIDL_BUILT += \
$(srcdir)/lib/vswitch-idl.c \
$(srcdir)/lib/vswitch-idl.h \
$(srcdir)/lib/vswitch-idl.ovsidl \
$(srcdir)/lib/vtep-idl.c \
$(srcdir)/lib/vtep-idl.h \
$(srcdir)/lib/vtep-idl.ovsidl
$(srcdir)/lib/vswitch-idl.ovsidl

EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
VSWITCH_IDL_FILES = \
Expand All @@ -449,14 +444,6 @@ $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
$(AM_V_GEN)$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp && \
mv $@.tmp $@

EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
VTEP_IDL_FILES = \
$(srcdir)/vtep/vtep.ovsschema \
$(srcdir)/lib/vtep-idl.ann
$(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
$(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp && \
mv $@.tmp $@

lib/dirs.c: lib/dirs.c.in Makefile
$(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
-e 's,[@]srcdir[@],$(srcdir),g' \
Expand Down
3 changes: 3 additions & 0 deletions vtep/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/Makefile.in
/vtep-ctl
/vtep-ctl.8
/vtep-idl.c
/vtep-idl.h
/vtep-idl.ovsidl
/vtep.5
/vtep.gv
/vtep.ovsschema.stamp
Expand Down
28 changes: 26 additions & 2 deletions vtep/automake.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# vtep IDL
OVSIDL_BUILT += \
vtep/vtep-idl.c \
vtep/vtep-idl.h \
vtep/vtep.ovsidl
EXTRA_DIST += vtep/vtep-idl.ann
VTEP_IDL_FILES = \
$(srcdir)/vtep/vtep.ovsschema \
$(srcdir)/vtep/vtep-idl.ann
vtep/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
$(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp && \
mv $@.tmp $@
CLEANFILES += vtep/vtep-idl.c vtep/vtep-idl.h

# libvtep
lib_LTLIBRARIES += vtep/libvtep.la
vtep_libvtep_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-Wl,--version-script=$(top_builddir)/vtep/libvtep.sym \
$(AM_LDFLAGS)
vtep_libvtep_la_SOURCES = \
vtep/vtep-idl.c \
vtep/vtep-idl.h

bin_PROGRAMS += \
vtep/vtep-ctl

Expand All @@ -11,7 +35,7 @@ man_MANS += \
vtep/vtep-ctl.8

vtep_vtep_ctl_SOURCES = vtep/vtep-ctl.c
vtep_vtep_ctl_LDADD = lib/libopenvswitch.la
vtep_vtep_ctl_LDADD = vtep/libvtep.la lib/libopenvswitch.la

# ovs-vtep
scripts_SCRIPTS += \
Expand Down Expand Up @@ -46,7 +70,7 @@ EXTRA_DIST += vtep/vtep.xml
DISTCLEANFILES += vtep/vtep.5
man_MANS += vtep/vtep.5
vtep/vtep.5: \
ovsdb/ovsdb-doc vtep/vtep.xml vtep/vtep.ovsschema $(VTEP_PIC)
ovsdb/ovsdb-doc vtep/vtep.xml $(srcdir)/vtep/vtep.ovsschema $(VTEP_PIC)
$(AM_V_GEN)$(OVSDB_DOC) \
$(VTEP_DOT_DIAGRAM_ARG) \
--version=$(VERSION) \
Expand Down
2 changes: 1 addition & 1 deletion vtep/vtep-ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "smap.h"
#include "sset.h"
#include "svec.h"
#include "lib/vtep-idl.h"
#include "vtep/vtep-idl.h"
#include "table.h"
#include "timeval.h"
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/vtep-idl.ann → vtep/vtep-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"] = "vteprec_"
s["idlHeader"] = "\"lib/vtep-idl.h\""
s["idlHeader"] = "\"vtep/vtep-idl.h\""

0 comments on commit 9d82156

Please sign in to comment.