forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automake.mk
70 lines (60 loc) · 1.83 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
bin_PROGRAMS += \
vtep/vtep-ctl
MAN_ROOTS += \
vtep/vtep-ctl.8.in
DISTCLEANFILES += \
vtep/vtep-ctl.8
man_MANS += \
vtep/vtep-ctl.8
vtep_vtep_ctl_SOURCES = vtep/vtep-ctl.c
vtep_vtep_ctl_LDADD = lib/libopenvswitch.la
# ovs-vtep
scripts_SCRIPTS += \
vtep/ovs-vtep
docs += vtep/README.ovs-vtep.md
EXTRA_DIST += vtep/ovs-vtep
# VTEP schema and IDL
EXTRA_DIST += vtep/vtep.ovsschema
pkgdata_DATA += vtep/vtep.ovsschema
# VTEP 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
vtep/vtep.gv: ovsdb/ovsdb-dot.in vtep/vtep.ovsschema
$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/vtep/vtep.ovsschema > $@
vtep/vtep.pic: vtep/vtep.gv ovsdb/dot2pic
$(AM_V_GEN)(dot -T plain < vtep/vtep.gv | $(PERL) $(srcdir)/ovsdb/dot2pic -f 3) > [email protected] && \
mv [email protected] $@
VTEP_PIC = vtep/vtep.pic
VTEP_DOT_DIAGRAM_ARG = --er-diagram=$(VTEP_PIC)
DISTCLEANFILES += vtep/vtep.gv vtep/vtep.pic
endif
endif
# VTEP schema documentation
EXTRA_DIST += vtep/vtep.xml
DISTCLEANFILES += vtep/vtep.5
man_MANS += vtep/vtep.5
vtep/vtep.5: \
ovsdb/ovsdb-doc vtep/vtep.xml vtep/vtep.ovsschema $(VTEP_PIC)
$(AM_V_GEN)$(OVSDB_DOC) \
--title="vtep" \
$(VTEP_DOT_DIAGRAM_ARG) \
--version=$(VERSION) \
$(srcdir)/vtep/vtep.ovsschema \
$(srcdir)/vtep/vtep.xml > [email protected] && \
mv [email protected] $@
# Version checking for vtep.ovsschema.
ALL_LOCAL += vtep/vtep.ovsschema.stamp
vtep/vtep.ovsschema.stamp: vtep/vtep.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 += vtep/vtep.ovsschema.stamp