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 pkgdata_DATA += vswitchd/vswitch.ovsschema
46 vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
47 $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
52 # There are two complications here. First, if "python" or "dot" is not
53 # available, then we have to just use the existing diagram. Second, different
54 # "dot" versions produce slightly different output for the same input, but we
55 # don't want to gratuitously change vswitch.pic if someone tweaks the schema in
56 # some minor way that doesn't affect the table structure. To avoid that we
57 # store a checksum of vswitch.gv in vswitch.pic and only regenerate vswitch.pic
58 # if vswitch.gv actually changes.
59 $(srcdir)/vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema
61 $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@
65 $(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic
67 sum=`cksum < $(srcdir)/vswitchd/vswitch.gv`; \
68 if grep "$$sum" $@ >/dev/null 2>&1; then \
69 echo "vswitch.gv unchanged, not regenerating vswitch.pic"; \
72 echo "regenerating vswitch.pic"; \
73 (echo ".\\\" Generated from vswitch.gv with cksum \"$$sum\""; \
74 dot -T plain < $(srcdir)/vswitchd/vswitch.gv \
75 | $(srcdir)/ovsdb/dot2pic) > $@; \
80 EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic
82 # vswitch schema documentation
83 EXTRA_DIST += vswitchd/vswitch.xml
84 dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5
85 vswitchd/ovs-vswitchd.conf.db.5: \
86 ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
87 $(srcdir)/vswitchd/vswitch.pic
89 --title="ovs-vswitchd.conf.db" \
90 --er-diagram=$(srcdir)/vswitchd/vswitch.pic \
91 $(srcdir)/vswitchd/vswitch.ovsschema \
92 $(srcdir)/vswitchd/vswitch.xml > $@.tmp
95 # Version checking for vswitch.ovsschema.
96 ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
97 vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
98 @sum=`sed '/cksum/d' $? | cksum`; \
99 expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
100 if test "X$$sum" = "X$$expected"; then \
103 ln=`sed -n '/"cksum":/=' $?`; \
104 echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
107 CLEANFILES += vswitchd/vswitch.ovsschema.stamp