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