paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | ## Process this file with automake to produce Makefile.in. |
| 2 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 3 | # 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 |
| 9 | # to do conversion from png to eps. |
| 10 | # |
| 11 | # PDF is required for quagga.pdf, we use epstopdf from the well known TeTeX |
| 12 | # TeX implementation, which we depend on already anyway. |
| 13 | # |
| 14 | # dia -> (dia) -> png -> (convert) -> eps -> (epstopdf) -> pdf |
| 15 | DIATOPNG = dia -t png -e |
| 16 | DIATOEPS = dia -t eps -e |
| 17 | PNGTOEPS = convert |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 18 | EPSTOPDF = epstopdf |
| 19 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 20 | # The figure sources |
| 21 | figures_names_parts = -normal-processing -rs-processing \ |
| 22 | _topologies_full _topologies_rs |
| 23 | figures_SOURCES := $(figures_names_parts:%=fig%.dia) |
| 24 | figures_BUILT_SOURCES := $(figures_names_parts:%=fig%.png) \ |
| 25 | $(figures_names_parts:%=fig%.eps) \ |
| 26 | $(figures_names_parts:%=fig%.pdf) |
| 27 | |
| 28 | # rather twisted logic because we have to build PDFs of the EPS figures for |
| 29 | # PDFTex and yet build one PDF, quagga.pdf, from texi source. Which means we |
| 30 | # cant rely on a single automatic rule for *.pdf, eg the one automatically |
| 31 | # provided by automake. If you are an automake wizard, please feel free to |
| 32 | # compact it somehow. |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 33 | |
| 34 | # Built from defines.texi.in |
| 35 | BUILT_SOURCES = defines.texi |
| 36 | |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 37 | info_TEXINFOS = quagga.texi |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 38 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 39 | # i'd prefer to have this in CVS, but not nice for dist tarball users, |
| 40 | # as these are all built sources, with various build dependencies (eg dia) |
| 41 | #CLEANFILES = *.pdf *.eps *.png |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 42 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 43 | # Have to manually specify the quagga.pdf rule in order to allow |
| 44 | # us to have a generic automatic .pdf rule to build the figure sources |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 45 | quagga.pdf: quagga.texi \ |
| 46 | fig-normal-processing.pdf fig_topologies_full.pdf \ |
| 47 | fig-rs-processing.pdf fig_topologies_rs.pdf |
| 48 | $(TEXI2PDF) -o "$@" $(info_TEXINFOS) |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 49 | |
paul | 5282d6e | 2003-08-13 04:55:13 +0000 | [diff] [blame] | 50 | quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 51 | ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \ |
paul | e050db2 | 2004-11-08 16:28:39 +0000 | [diff] [blame] | 52 | protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi \ |
paul | 47004ec | 2005-04-02 12:13:59 +0000 | [diff] [blame] | 53 | vtysh.texi routeserver.texi defines.texi $(figures_BUILT_SOURCES) |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 54 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 55 | %.eps: %.png |
| 56 | $(PNGTOEPS) $< "$@" |
| 57 | |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 58 | %.pdf: %.eps |
| 59 | $(EPSTOPDF) --outfile="$@" $< |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 60 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 61 | %.png: %.dia |
| 62 | $(DIATOPNG) "$@" $< |
| 63 | |
hasso | ee3e115 | 2004-12-18 15:59:25 +0000 | [diff] [blame] | 64 | man_MANS = vtysh.1 bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8 isisd.8 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 65 | |
gdt | f2bfdee | 2004-06-30 17:25:15 +0000 | [diff] [blame] | 66 | EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt $(man_MANS) \ |
| 67 | mpls/ChangeLog.opaque.txt mpls/cli_summary.txt \ |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 68 | mpls/opaque_lsa.txt mpls/ospfd.conf $(figures_BUILT_SOURCES) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 69 | |
| 70 | draft-zebra-00.txt: |
| 71 | groff -T ascii -ms draft-zebra-00.ms > draft-zebra-00.txt |