blob: ed3a6d52f97add64b328b0c94fb4d31eae9c55db [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001## Process this file with automake to produce Makefile.in.
2
paulbbd938e2005-04-02 10:18:42 +00003# Dia, the version i have at least, doesn't do very good EPS output
4# (some of the text is scaled strangely). So this will work, but
5# it is probably better to use something like gimp to convert the
6# dia exported PNG files to EPS manually.
7#
8# Here we use 'convert' from the well known 'ImageMagick' package
Paul Jakmaab2416a2006-04-03 21:24:27 +00009# to do conversion from png to eps/pdf for figures.
10# PDF form is required for quagga.pdf, using PDFTex at least.
paulbbd938e2005-04-02 10:18:42 +000011#
paulbbd938e2005-04-02 10:18:42 +000012# TeX implementation, which we depend on already anyway.
13#
14# dia -> (dia) -> png -> (convert) -> eps -> (epstopdf) -> pdf
15DIATOPNG = dia -t png -e
16DIATOEPS = dia -t eps -e
Paul Jakmaab2416a2006-04-03 21:24:27 +000017PNGTOEPS = convert -dither -antialias -contrast -despeckle
18PNGTOPDF = $(PNGTOEPS)
paul6a22b1f2004-11-07 19:39:13 +000019EPSTOPDF = epstopdf
20
paulbbd938e2005-04-02 10:18:42 +000021# The figure sources
22figures_names_parts = -normal-processing -rs-processing \
23 _topologies_full _topologies_rs
paula47d98f2005-04-02 18:53:00 +000024figures_sources := $(figures_names_parts:%=fig%.dia)
25figures_png := $(figures_names_parts:%=fig%.png)
26figures_pdf := $(figures_names_parts:%=fig%.pdf)
27figures_eps := $(figures_names_parts:%=fig%.eps)
Paul Jakmaab2416a2006-04-03 21:24:27 +000028figures_txt := $(figures_names_parts:%=fig%.txt)
paulbbd938e2005-04-02 10:18:42 +000029
30# rather twisted logic because we have to build PDFs of the EPS figures for
31# PDFTex and yet build one PDF, quagga.pdf, from texi source. Which means we
32# cant rely on a single automatic rule for *.pdf, eg the one automatically
33# provided by automake. If you are an automake wizard, please feel free to
34# compact it somehow.
paul6a22b1f2004-11-07 19:39:13 +000035
36# Built from defines.texi.in
pauld9905f02005-04-05 08:04:18 +000037BUILT_SOURCES = defines.texi
paul6a22b1f2004-11-07 19:39:13 +000038
paul7190f4e2003-08-12 12:40:20 +000039info_TEXINFOS = quagga.texi
paul718e3742002-12-13 20:15:29 +000040
paulbbd938e2005-04-02 10:18:42 +000041# Have to manually specify the quagga.pdf rule in order to allow
42# us to have a generic automatic .pdf rule to build the figure sources
pauld9905f02005-04-05 08:04:18 +000043# because it cant just work from the png's directly it seems - contrary
44# to the documentation...
paule5b308d2005-10-29 20:19:49 +000045quagga.pdf: $(info_TEXINFOS) $(figures_pdf)
paul649e8532005-04-28 18:21:15 +000046 $(TEXI2PDF) -o "$@" $<
paul76b89b42004-11-06 17:13:09 +000047
paul5282d6e2003-08-13 04:55:13 +000048quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \
paul718e3742002-12-13 20:15:29 +000049 ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \
paule050db22004-11-08 16:28:39 +000050 protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi \
Paul Jakmaab2416a2006-04-03 21:24:27 +000051 vtysh.texi routeserver.texi defines.texi $(figures_png) snmptrap.texi \
52 $(figures_txt)
paul6a22b1f2004-11-07 19:39:13 +000053
paulbbd938e2005-04-02 10:18:42 +000054%.eps: %.png
55 $(PNGTOEPS) $< "$@"
56
Paul Jakmaab2416a2006-04-03 21:24:27 +000057%.pdf: %.png
58 $(PNGTOPDF) $< "$@"
paul718e3742002-12-13 20:15:29 +000059
paulbbd938e2005-04-02 10:18:42 +000060%.png: %.dia
61 $(DIATOPNG) "$@" $<
62
hassoee3e1152004-12-18 15:59:25 +000063man_MANS = vtysh.1 bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8 isisd.8
paul718e3742002-12-13 20:15:29 +000064
gdtf2bfdee2004-06-30 17:25:15 +000065EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt $(man_MANS) \
66 mpls/ChangeLog.opaque.txt mpls/cli_summary.txt \
paula47d98f2005-04-02 18:53:00 +000067 mpls/opaque_lsa.txt mpls/ospfd.conf \
Paul Jakmaab2416a2006-04-03 21:24:27 +000068 $(figures_sources) $(figures_png) $(figures_txt)
paul718e3742002-12-13 20:15:29 +000069
Andrew J. Schorr54afb652007-03-21 21:03:44 +000070draft-zebra-00.txt: draft-zebra-00.ms
71 groff -T ascii -ms $< > $@