1 sbin_PROGRAMS += vswitchd/ovs-vswitchd
2 man_MANS += vswitchd/ovs-vswitchd.8
4 vswitchd/ovs-vswitchd.8
6 vswitchd_ovs_vswitchd_SOURCES = \
9 vswitchd/ovs-vswitchd.c \
10 vswitchd/system-stats.c \
11 vswitchd/system-stats.h \
12 vswitchd/xenserver.c \
14 vswitchd_ovs_vswitchd_LDADD = \
15 ofproto/libofproto.a \
17 lib/libopenvswitch.a \
19 EXTRA_DIST += vswitchd/INTERNALS
20 MAN_ROOTS += vswitchd/ovs-vswitchd.8.in
22 # vswitch schema and IDL
23 EXTRA_DIST += vswitchd/vswitch.ovsschema
24 pkgdata_DATA += vswitchd/vswitch.ovsschema
28 # There are two complications here. First, if "python" or "dot" is not
29 # available, then we have to just use the existing diagram. Second, different
30 # "dot" versions produce slightly different output for the same input, but we
31 # don't want to gratuitously change vswitch.pic if someone tweaks the schema in
32 # some minor way that doesn't affect the table structure. To avoid that we
33 # store a checksum of vswitch.gv in vswitch.pic and only regenerate vswitch.pic
34 # if vswitch.gv actually changes.
35 $(srcdir)/vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema
37 $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@
41 $(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic
43 sum=`cksum < $(srcdir)/vswitchd/vswitch.gv`; \
44 if grep "$$sum" $@ >/dev/null 2>&1; then \
45 echo "vswitch.gv unchanged, not regenerating vswitch.pic"; \
48 echo "regenerating vswitch.pic"; \
49 (echo ".\\\" Generated from vswitch.gv with cksum \"$$sum\""; \
50 dot -T plain < $(srcdir)/vswitchd/vswitch.gv \
51 | $(srcdir)/ovsdb/dot2pic) > $@; \
56 EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic
58 # vswitch schema documentation
59 EXTRA_DIST += vswitchd/vswitch.xml
60 DISTCLEANFILES += $(srcdir)/vswitchd/ovs-vswitchd.conf.db.5
61 dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5
62 $(srcdir)/vswitchd/ovs-vswitchd.conf.db.5: \
63 ovsdb/ovsdb-doc vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
64 $(srcdir)/vswitchd/vswitch.pic
66 --title="ovs-vswitchd.conf.db" \
67 --er-diagram=$(srcdir)/vswitchd/vswitch.pic \
68 --version=$(VERSION) \
69 $(srcdir)/vswitchd/vswitch.ovsschema \
70 $(srcdir)/vswitchd/vswitch.xml > $@.tmp
73 # Version checking for vswitch.ovsschema.
74 ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
75 vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
76 @sum=`sed '/cksum/d' $? | cksum`; \
77 expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
78 if test "X$$sum" = "X$$expected"; then \
81 ln=`sed -n '/"cksum":/=' $?`; \
82 echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
85 CLEANFILES += vswitchd/vswitch.ovsschema.stamp
87 # Clean up generated files from older OVS versions. (This is important so that
88 # #include "vswitch-idl.h" doesn't get the wrong copy.)
89 CLEANFILES += vswitchd/vswitch-idl.c vswitchd/vswitch-idl.h