From 9d82156981bfcbf539ff80938c7d3b90bc3a8ab2 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 5 Mar 2015 00:00:03 -0800 Subject: [PATCH] vtep: Move vtep IDL files into new "libvtep.la". 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 --- lib/.gitignore | 3 --- lib/automake.mk | 15 +-------------- vtep/.gitignore | 3 +++ vtep/automake.mk | 28 ++++++++++++++++++++++++++-- vtep/vtep-ctl.c | 2 +- {lib => vtep}/vtep-idl.ann | 2 +- 6 files changed, 32 insertions(+), 21 deletions(-) rename {lib => vtep}/vtep-idl.ann (88%) diff --git a/lib/.gitignore b/lib/.gitignore index cdaee87d4..9f6e92446 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -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 diff --git a/lib/automake.mk b/lib/automake.mk index 2acfe18a5..362907919 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -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 \ @@ -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 = \ @@ -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' \ diff --git a/vtep/.gitignore b/vtep/.gitignore index c898bc40a..2f1351239 100644 --- a/vtep/.gitignore +++ b/vtep/.gitignore @@ -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 diff --git a/vtep/automake.mk b/vtep/automake.mk index a204d0a50..789268573 100644 --- a/vtep/automake.mk +++ b/vtep/automake.mk @@ -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 @@ -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 += \ @@ -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) \ diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index 7a7fd8873..3e8066e0d 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -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" diff --git a/lib/vtep-idl.ann b/vtep/vtep-idl.ann similarity index 88% rename from lib/vtep-idl.ann rename to vtep/vtep-idl.ann index 5ffe58545..c53483f06 100644 --- a/lib/vtep-idl.ann +++ b/vtep/vtep-idl.ann @@ -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\"" -- 2.39.5