vtep: Move vtep IDL files into new "libvtep.la".
authorJustin Pettit <jpettit@nicira.com>
Thu, 5 Mar 2015 08:00:03 +0000 (00:00 -0800)
committerJustin Pettit <jpettit@nicira.com>
Thu, 5 Mar 2015 22:11:53 +0000 (14:11 -0800)
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 <jpettit@nicira.com>
lib/.gitignore
lib/automake.mk
lib/vtep-idl.ann [deleted file]
vtep/.gitignore
vtep/automake.mk
vtep/vtep-ctl.c
vtep/vtep-idl.ann [new file with mode: 0644]

index cdaee87..9f6e924 100644 (file)
@@ -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
index 2acfe18..3629079 100644 (file)
@@ -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/lib/vtep-idl.ann b/lib/vtep-idl.ann
deleted file mode 100644 (file)
index 5ffe585..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"] = "vteprec_"
-s["idlHeader"] = "\"lib/vtep-idl.h\""
index c898bc4..2f13512 100644 (file)
@@ -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
index a204d0a..7892685 100644 (file)
@@ -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) \
index 7a7fd88..3e8066e 100644 (file)
@@ -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/vtep/vtep-idl.ann b/vtep/vtep-idl.ann
new file mode 100644 (file)
index 0000000..c53483f
--- /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"] = "vteprec_"
+s["idlHeader"] = "\"vtep/vtep-idl.h\""