openvswitch: Remove Linux bridge compatibility.
[sliver-openvswitch.git] / vswitchd / automake.mk
1 sbin_PROGRAMS += vswitchd/ovs-vswitchd
2 man_MANS += vswitchd/ovs-vswitchd.8
3 DISTCLEANFILES += \
4         vswitchd/ovs-vswitchd.8
5
6 vswitchd_ovs_vswitchd_SOURCES = \
7         vswitchd/bridge.c \
8         vswitchd/bridge.h \
9         vswitchd/ovs-vswitchd.c \
10         vswitchd/system-stats.c \
11         vswitchd/system-stats.h \
12         vswitchd/xenserver.c \
13         vswitchd/xenserver.h
14 vswitchd_ovs_vswitchd_LDADD = \
15         ofproto/libofproto.a \
16         lib/libsflow.a \
17         lib/libopenvswitch.a \
18         $(SSL_LIBS)
19 EXTRA_DIST += vswitchd/INTERNALS
20 MAN_ROOTS += vswitchd/ovs-vswitchd.8.in
21
22 # vswitch schema and IDL
23 EXTRA_DIST += vswitchd/vswitch.ovsschema
24 pkgdata_DATA += vswitchd/vswitch.ovsschema
25
26 # vswitch E-R diagram
27 #
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
36 if HAVE_PYTHON
37         $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@
38 else
39         touch $@
40 endif
41 $(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic
42 if HAVE_DOT
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";    \
46           touch $@;                                                     \
47         else                                                            \
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) > $@;                            \
52         fi
53 else
54         touch $@
55 endif
56 EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic
57
58 # vswitch schema documentation
59 EXTRA_DIST += vswitchd/vswitch.xml
60 dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5
61 $(srcdir)/vswitchd/ovs-vswitchd.conf.db.5: \
62         ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
63         $(srcdir)/vswitchd/vswitch.pic
64         $(OVSDB_DOC) \
65                 --title="ovs-vswitchd.conf.db" \
66                 --er-diagram=$(srcdir)/vswitchd/vswitch.pic \
67                 $(srcdir)/vswitchd/vswitch.ovsschema \
68                 $(srcdir)/vswitchd/vswitch.xml > $@.tmp
69         mv $@.tmp $@
70
71 # Version checking for vswitch.ovsschema.
72 ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
73 vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
74         @sum=`sed '/cksum/d' $? | cksum`; \
75         expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
76         if test "X$$sum" = "X$$expected"; then \
77           touch $@; \
78         else \
79           ln=`sed -n '/"cksum":/=' $?`; \
80           echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
81           exit 1; \
82         fi
83 CLEANFILES += vswitchd/vswitch.ovsschema.stamp
84
85 # Clean up generated files from older OVS versions.  (This is important so that
86 # #include "vswitch-idl.h" doesn't get the wrong copy.)
87 CLEANFILES += vswitchd/vswitch-idl.c vswitchd/vswitch-idl.h