1 sbin_PROGRAMS += vswitchd/ovs-vswitchd
3 vswitchd/ovs-vswitchd.8 \
4 vswitchd/ovs-brcompatd.8
6 vswitchd/ovs-vswitchd.8 \
7 vswitchd/ovs-brcompatd.8
9 vswitchd_ovs_vswitchd_SOURCES = \
12 vswitchd/ovs-vswitchd.c \
13 vswitchd/system-stats.c \
14 vswitchd/system-stats.h \
15 vswitchd/vswitch-idl.c \
16 vswitchd/vswitch-idl.h \
17 vswitchd/xenserver.c \
19 vswitchd_ovs_vswitchd_LDADD = \
20 ofproto/libofproto.a \
22 lib/libopenvswitch.a \
25 vswitchd/ovs-vswitchd.8.in \
29 sbin_PROGRAMS += vswitchd/ovs-brcompatd
30 vswitchd_ovs_brcompatd_SOURCES = \
31 vswitchd/ovs-brcompatd.c \
32 vswitchd/vswitch-idl.c \
33 vswitchd/vswitch-idl.h
34 vswitchd_ovs_brcompatd_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
36 EXTRA_DIST += vswitchd/ovs-brcompatd.8.in
38 # vswitch schema and IDL
40 vswitchd/vswitch-idl.c \
41 vswitchd/vswitch-idl.h \
42 vswitchd/vswitch-idl.ovsidl
43 VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema vswitchd/vswitch-idl.ann
44 EXTRA_DIST += $(VSWITCH_IDL_FILES)
45 vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
46 $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
51 # There are two complications here. First, if "python" or "dot" is not
52 # available, then we have to just use the existing diagram. Second, different
53 # "dot" versions produce slightly different output for the same input, but we
54 # don't want to gratuitously change vswitch.pic if someone tweaks the schema in
55 # some minor way that doesn't affect the table structure. To avoid that we
56 # store a checksum of vswitch.gv in vswitch.pic and only regenerate vswitch.pic
57 # if vswitch.gv actually changes.
58 $(srcdir)/vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema
60 $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@
64 $(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic
66 sum=`cksum < $(srcdir)/vswitchd/vswitch.gv`; \
67 if grep "$$sum" $@ >/dev/null 2>&1; then \
68 echo "vswitch.gv unchanged, not regenerating vswitch.pic"; \
71 echo "regenerating vswitch.pic"; \
72 (echo ".\\\" Generated from vswitch.gv with cksum \"$$sum\""; \
73 dot -T plain < $(srcdir)/vswitchd/vswitch.gv \
74 | $(srcdir)/ovsdb/dot2pic) > $@; \
79 EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic
81 # vswitch schema documentation
82 EXTRA_DIST += vswitchd/vswitch.xml
83 dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5
84 vswitchd/ovs-vswitchd.conf.db.5: \
85 ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
86 $(srcdir)/vswitchd/vswitch.pic
88 --title="ovs-vswitchd.conf.db" \
89 --er-diagram=$(srcdir)/vswitchd/vswitch.pic \
90 $(srcdir)/vswitchd/vswitch.ovsschema \
91 $(srcdir)/vswitchd/vswitch.xml > $@.tmp
94 # Version checking for vswitch.ovsschema.
95 ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
96 vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
97 @sum=`sed '/cksum/d' $? | cksum`; \
98 expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
99 if test "X$$sum" = "X$$expected"; then \
102 ln=`sed -n '/"cksum":/=' $?`; \
103 echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
106 CLEANFILES += vswitchd/vswitch.ovsschema.stamp