-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathautomake.mk
108 lines (97 loc) · 3.17 KB
/
automake.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
if OPS
sbin_PROGRAMS += vswitchd/ops-switchd
else
sbin_PROGRAMS += vswitchd/ovs-vswitchd
endif
man_MANS += vswitchd/ovs-vswitchd.8
DISTCLEANFILES += \
vswitchd/ovs-vswitchd.8
if OPS
vswitchd_ops_switchd_SOURCES = \
vswitchd/bridge.c \
vswitchd/bridge.h \
vswitchd/ovs-vswitchd.c \
vswitchd/subsystem.c \
vswitchd/system-stats.c \
vswitchd/system-stats.h \
vswitchd/xenserver.c \
vswitchd/xenserver.h \
vswitchd/bufmon.c \
vswitchd/vrf.c \
vswitchd/vrf.h
vswitchd_ops_switchd_LDADD = \
lib/libovscommon.la \
ovsdb/libovsdb.la \
ofproto/libofproto.la \
lib/libsflow.la \
lib/libopenvswitch.la
vswitchd_ops_switchd_LDFLAGS = $(AM_LDFLAGS) $(DPDK_vswitchd_LDFLAGS)
else
vswitchd_ovs_vswitchd_SOURCES = \
vswitchd/bridge.c \
vswitchd/bridge.h \
vswitchd/ovs-vswitchd.c \
vswitchd/subsystem.c \
vswitchd/system-stats.c \
vswitchd/system-stats.h \
vswitchd/xenserver.c \
vswitchd/xenserver.h
vswitchd_ovs_vswitchd_LDADD = \
lib/libovscommon.la \
ovsdb/libovsdb.la \
ofproto/libofproto.la \
lib/libsflow.la \
lib/libopenvswitch.la
vswitchd_ovs_vswitchd_LDFLAGS = $(AM_LDFLAGS) $(DPDK_vswitchd_LDFLAGS)
endif
EXTRA_DIST += vswitchd/INTERNALS
MAN_ROOTS += vswitchd/ovs-vswitchd.8.in
# vswitch schema and IDL
EXTRA_DIST += vswitchd/vswitch.ovsschema
pkgdata_DATA += vswitchd/vswitch.ovsschema vswitchd/configdb.ovsschema vswitchd/dhcp_leases.ovsschema
# vswitch E-R diagram
#
# If "python" or "dot" is not available, then we do not add graphical diagram
# to the documentation.
if HAVE_PYTHON
if HAVE_DOT
vswitchd/vswitch.gv: ovsdb/ovsdb-dot.in vswitchd/vswitch.ovsschema
$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/vswitchd/vswitch.ovsschema > $@
vswitchd/vswitch.pic: vswitchd/vswitch.gv ovsdb/dot2pic
$(AM_V_GEN)(dot -T plain < vswitchd/vswitch.gv | $(PERL) $(srcdir)/ovsdb/dot2pic -f 3) > [email protected] && \
mv [email protected] $@
VSWITCH_PIC = vswitchd/vswitch.pic
VSWITCH_DOT_DIAGRAM_ARG = --er-diagram=$(VSWITCH_PIC)
DISTCLEANFILES += vswitchd/vswitch.gv vswitchd/vswitch.pic
endif
endif
# vswitch schema documentation
EXTRA_DIST += vswitchd/vswitch.xml
DISTCLEANFILES += vswitchd/ovs-vswitchd.conf.db.5
man_MANS += vswitchd/ovs-vswitchd.conf.db.5
vswitchd/ovs-vswitchd.conf.db.5: \
ovsdb/ovsdb-doc vswitchd/vswitch.xml vswitchd/vswitch.ovsschema \
$(VSWITCH_PIC)
$(AM_V_GEN)$(OVSDB_DOC) \
--title="ovs-vswitchd.conf.db" \
$(VSWITCH_DOT_DIAGRAM_ARG) \
--version=$(VERSION) \
$(srcdir)/vswitchd/vswitch.ovsschema \
$(srcdir)/vswitchd/vswitch.xml > [email protected] && \
mv [email protected] $@
# Version checking for vswitch.ovsschema.
ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp
vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema
@sum=`sed '/cksum/d' $? | cksum`; \
expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \
if test "X$$sum" = "X$$expected"; then \
touch $@; \
else \
ln=`sed -n '/"cksum":/=' $?`; \
echo >&2 "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \
exit 1; \
fi
CLEANFILES += vswitchd/vswitch.ovsschema.stamp
# Clean up generated files from older OVS versions. (This is important so that
# #include "vswitch-idl.h" doesn't get the wrong copy.)
CLEANFILES += vswitchd/vswitch-idl.c vswitchd/vswitch-idl.h