summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.am
blob: b2bdf91cd422f35f809b0cb85c7a66ca7351940f (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
## Process this file with automake to produce Makefile.in.

# Dia, the version i have at least, doesn't do very good EPS output
# (some of the text is scaled strangely). So this will work, but 
# it is probably better to use something like gimp to convert the 
# dia exported PNG files to EPS manually.
#
# Here we use 'convert' from the well known 'ImageMagick' package
# to do conversion from png to eps/pdf for figures. 
# PDF form is required for frr.pdf, using PDFTex at least.
#
# TeX implementation, which we depend on already anyway.
#
# dia -> (dia) -> png -> (convert) -> eps -> (epstopdf) -> pdf
SUFFIXES = .png .eps .dia .pdf
DIATOPNG = dia -t png -e
DIATOEPS = dia -t eps -e
PNGTOEPS = convert -antialias -contrast -despeckle
PNGTOPDF = $(PNGTOEPS)
EPSTOPDF = epstopdf

VNCFIGURES_PNG = 
VNCFIGURES_DIA = -vnc-mesh -vnc-frr-route-reflector		\
-vnc-commercial-route-reflector -vnc-redundant-route-reflectors	\
-vnc-gw -vnc-gw-rr

# TODO: A target that creates an empty text file for each member of
# VNCFIGURES_TXT
VNCFIGURES_TXT = $(VNCFIGURES:%.png=%.txt)

# The figure sources
figures_names_parts = -normal-processing -rs-processing \
	_topologies_full _topologies_rs \
	$(VNCFIGURES_DIA)

figures_sources = $(figures_names_parts:%=fig%.dia)
figures_png = $(figures_names_parts:%=fig%.png) $(VNCFIGURES_PNG)
figures_pdf = $(figures_names_parts:%=fig%.pdf) $(VNCFIGURES_PNG:%.png=%.pdf)
figures_eps = $(figures_names_parts:%=fig%.eps) $(VNCFIGURES_PNG:%.png=%.eps)
figures_txt = $(figures_names_parts:%=fig%.txt)

# rather twisted logic because we have to build PDFs of the EPS figures for
# PDFTex and yet build one PDF, frr.pdf, from texi source. Which means we
# cant rely on a single automatic rule for *.pdf, eg the one automatically
# provided by automake. If you are an automake wizard, please feel free to
# compact it somehow.

# Built from defines.texi.in
BUILT_SOURCES = defines.texi

info_TEXINFOS = frr.texi

# Have to manually specify the frr.pdf rule in order to allow
# us to have a generic automatic .pdf rule to build the figure sources
# because it cant just work from the png's directly it seems - contrary
# to the documentation...
frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS)
	$(TEXI2PDF) -o "$@" $< || true

frr_TEXINFOS = appendix.texi basic.texi bgpd.texi isisd.texi filter.texi \
	vnc.texi \
	babeld.texi \
	install.texi ipv6.texi kernel.texi main.texi \
	nhrpd.texi \
	eigrpd.texi \
	ospf6d.texi ospfd.texi \
	overview.texi protocol.texi ripd.texi ripngd.texi routemap.texi \
	snmp.texi vtysh.texi routeserver.texi defines.texi $(figures_png) \
	snmptrap.texi ospf_fundamentals.texi isisd.texi $(figures_txt)

.png.eps:
	$(PNGTOEPS) $< "$@"

.png.pdf:
	$(PNGTOPDF) $< "$@"

.dia.png:
	$(DIATOPNG) "$@" $<

man_MANS = frr.1

if PIMD
man_MANS += pimd.8
endif

if BGPD
man_MANS += bgpd.8
endif

if ISISD
man_MANS += isisd.8
endif

if OSPF6D
man_MANS += ospf6d.8
endif

if OSPFCLIENT
man_MANS += ospfclient.8
endif

if OSPFD
man_MANS += ospfd.8
endif

if LDPD
man_MANS += ldpd.8
endif

if RIPD
man_MANS += ripd.8
endif

if RIPNGD
man_MANS += ripngd.8
endif

if NHRPD
man_MANS += nhrpd.8
endif

if VTYSH
man_MANS += vtysh.1
endif

if WATCHFRR
man_MANS += watchfrr.8
endif

if ZEBRA
man_MANS += zebra.8
endif

if EIGRPD
man_MANS += eigrpd.8
endif

EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt \
	\
	bgpd.8.in \
	isisd.8.in \
	ospf6d.8.in \
	ospfclient.8.in \
	ospfd.8.in \
	ldpd.8.in \
	ripd.8.in \
	ripngd.8.in \
	pimd.8.in \
	nhrpd.8.in \
	vtysh.1.in \
	watchfrr.8.in \
	zebra.8.in \
	frr.1.in \
	eigrpd.8.in \
	\
	mpls/ChangeLog.opaque.txt mpls/cli_summary.txt \
	mpls/opaque_lsa.txt mpls/ospfd.conf \
	$(figures_sources) $(figures_png) $(figures_txt)

draft-zebra-00.txt: draft-zebra-00.ms
	groff -T ascii -ms $< > $@

# Ensure that all of the figures are copied into the html directory
html-local: $(HTMLS)
	if test -d $(HTMLS) ; then \
		cp -p $(figures_png) $(HTMLS) ; \
	else \
		echo "$(HTMLS) is not a directory. Make it so, the rerun make."; \
	fi