X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fautomake.mk;h=4c3c07622e5c490aac578f96ffe63dfed2815e18;hb=956090549cd993dda8c8518a62b69289e3bbd06c;hp=8067159cf374bcb9f0ca378823a2e47f29fe2f2d;hpb=e75e8930d35a286270b33a746c2b61b5f2185b8b;p=openvswitch diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk index 8067159c..4c3c0762 100644 --- a/vswitchd/automake.mk +++ b/vswitchd/automake.mk @@ -12,6 +12,8 @@ vswitchd_ovs_vswitchd_SOURCES = \ vswitchd/proc-net-compat.c \ vswitchd/proc-net-compat.h \ vswitchd/ovs-vswitchd.c \ + vswitchd/system-stats.c \ + vswitchd/system-stats.h \ vswitchd/vswitch-idl.c \ vswitchd/vswitch-idl.h \ vswitchd/xenserver.c \ @@ -21,7 +23,9 @@ vswitchd_ovs_vswitchd_LDADD = \ lib/libsflow.a \ lib/libopenvswitch.a \ $(SSL_LIBS) -EXTRA_DIST += vswitchd/ovs-vswitchd.8.in +EXTRA_DIST += \ + vswitchd/ovs-vswitchd.8.in \ + vswitchd/INTERNALS if HAVE_NETLINK sbin_PROGRAMS += vswitchd/ovs-brcompatd @@ -44,13 +48,47 @@ vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES) $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp mv $@.tmp $@ +# vswitch E-R diagram +# +# There are two complications here. First, if "python" or "dot" is not +# available, then we have to just use the existing diagram. Second, different +# "dot" versions produce slightly different output for the same input, but we +# don't want to gratuitously change vswitch.pic if someone tweaks the schema in +# some minor way that doesn't affect the table structure. To avoid that we +# store a checksum of vswitch.gv in vswitch.pic and only regenerate vswitch.pic +# if vswitch.gv actually changes. +$(srcdir)/vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema +if HAVE_PYTHON + $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@ +else + touch $@ +endif +$(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic +if HAVE_DOT + sum=`cksum < $(srcdir)/vswitchd/vswitch.gv`; \ + if grep "$$sum" $@ >/dev/null 2>&1; then \ + echo "vswitch.gv unchanged, not regenerating vswitch.pic"; \ + touch $@; \ + else \ + echo "regenerating vswitch.pic"; \ + (echo ".\\\" Generated from vswitch.gv with cksum \"$$sum\""; \ + dot -T plain < $(srcdir)/vswitchd/vswitch.gv \ + | $(srcdir)/ovsdb/dot2pic) > $@; \ + fi +else + touch $@ +endif +EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic + # vswitch schema documentation EXTRA_DIST += vswitchd/vswitch.xml dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5 vswitchd/ovs-vswitchd.conf.db.5: \ - ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema + ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \ + $(srcdir)/vswitchd/vswitch.pic $(OVSDB_DOC) \ --title="ovs-vswitchd.conf.db" \ + --er-diagram=$(srcdir)/vswitchd/vswitch.pic \ $(srcdir)/vswitchd/vswitch.ovsschema \ $(srcdir)/vswitchd/vswitch.xml > $@.tmp mv $@.tmp $@