]> git.proxmox.com Git - ovs.git/blob - vswitchd/automake.mk
configure: add configure option to disable building brcompat
[ovs.git] / vswitchd / automake.mk
1 sbin_PROGRAMS += vswitchd/ovs-vswitchd
2 man_MANS += vswitchd/ovs-vswitchd.8
3 if BUILD_BRCOMPAT
4 man_MANS += vswitchd/ovs-brcompatd.8
5 endif
6 DISTCLEANFILES += \
7 vswitchd/ovs-vswitchd.8 \
8 vswitchd/ovs-brcompatd.8
9
10 vswitchd_ovs_vswitchd_SOURCES = \
11 vswitchd/bridge.c \
12 vswitchd/bridge.h \
13 vswitchd/ovs-vswitchd.c \
14 vswitchd/system-stats.c \
15 vswitchd/system-stats.h \
16 vswitchd/vswitch-idl.c \
17 vswitchd/vswitch-idl.h \
18 vswitchd/xenserver.c \
19 vswitchd/xenserver.h
20 vswitchd_ovs_vswitchd_LDADD = \
21 ofproto/libofproto.a \
22 lib/libsflow.a \
23 lib/libopenvswitch.a \
24 $(SSL_LIBS)
25 EXTRA_DIST += vswitchd/INTERNALS
26 MAN_ROOTS += vswitchd/ovs-vswitchd.8.in
27
28 if BUILD_BRCOMPAT
29 if HAVE_NETLINK
30 sbin_PROGRAMS += vswitchd/ovs-brcompatd
31 vswitchd_ovs_brcompatd_SOURCES = \
32 vswitchd/ovs-brcompatd.c \
33 vswitchd/vswitch-idl.c \
34 vswitchd/vswitch-idl.h
35 vswitchd_ovs_brcompatd_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
36 endif
37 MAN_ROOTS += vswitchd/ovs-brcompatd.8.in
38 endif
39
40 # vswitch schema and IDL
41 OVSIDL_BUILT += \
42 vswitchd/vswitch-idl.c \
43 vswitchd/vswitch-idl.h \
44 vswitchd/vswitch-idl.ovsidl
45 VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema vswitchd/vswitch-idl.ann
46 EXTRA_DIST += $(VSWITCH_IDL_FILES)
47 pkgdata_DATA += vswitchd/vswitch.ovsschema
48 vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
49 $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
50 mv $@.tmp $@
51
52 # vswitch E-R diagram
53 #
54 # There are two complications here. First, if "python" or "dot" is not
55 # available, then we have to just use the existing diagram. Second, different
56 # "dot" versions produce slightly different output for the same input, but we
57 # don't want to gratuitously change vswitch.pic if someone tweaks the schema in
58 # some minor way that doesn't affect the table structure. To avoid that we
59 # store a checksum of vswitch.gv in vswitch.pic and only regenerate vswitch.pic
60 # if vswitch.gv actually changes.
61 $(srcdir)/vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema
62 if HAVE_PYTHON
63 $(OVSDB_DOT) $(srcdir)/vswitchd/vswitch.ovsschema > $@
64 else
65 touch $@
66 endif
67 $(srcdir)/vswitchd/vswitch.pic: $(srcdir)/vswitchd/vswitch.gv ovsdb/dot2pic
68 if HAVE_DOT
69 sum=`cksum < $(srcdir)/vswitchd/vswitch.gv`; \
70 if grep "$$sum" $@ >/dev/null 2>&1; then \
71 echo "vswitch.gv unchanged, not regenerating vswitch.pic"; \
72 touch $@; \
73 else \
74 echo "regenerating vswitch.pic"; \
75 (echo ".\\\" Generated from vswitch.gv with cksum \"$$sum\""; \
76 dot -T plain < $(srcdir)/vswitchd/vswitch.gv \
77 | $(srcdir)/ovsdb/dot2pic) > $@; \
78 fi
79 else
80 touch $@
81 endif
82 EXTRA_DIST += vswitchd/vswitch.gv vswitchd/vswitch.pic
83
84 # vswitch schema documentation
85 EXTRA_DIST += vswitchd/vswitch.xml
86 dist_man_MANS += vswitchd/ovs-vswitchd.conf.db.5
87 $(srcdir)/vswitchd/ovs-vswitchd.conf.db.5: \
88 ovsdb/ovsdb-doc.in vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
89 $(srcdir)/vswitchd/vswitch.pic
90 $(OVSDB_DOC) \
91 --title="ovs-vswitchd.conf.db" \
92 --er-diagram=$(srcdir)/vswitchd/vswitch.pic \
93 $(srcdir)/vswitchd/vswitch.ovsschema \
94 $(srcdir)/vswitchd/vswitch.xml > $@.tmp
95 mv $@.tmp $@
96
97 # Version checking for vswitch.ovsschema.
98 ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
99 vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
100 @sum=`sed '/cksum/d' $? | cksum`; \
101 expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
102 if test "X$$sum" = "X$$expected"; then \
103 touch $@; \
104 else \
105 ln=`sed -n '/"cksum":/=' $?`; \
106 echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
107 exit 1; \
108 fi
109 CLEANFILES += vswitchd/vswitch.ovsschema.stamp