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 |
Paul Jakma | ab2416a | 2006-04-03 21:24:27 +0000 | [diff] [blame] | 9 | # to do conversion from png to eps/pdf for figures. |
| 10 | # PDF form is required for quagga.pdf, using PDFTex at least. |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 11 | # |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 12 | # TeX implementation, which we depend on already anyway. |
| 13 | # |
| 14 | # dia -> (dia) -> png -> (convert) -> eps -> (epstopdf) -> pdf |
Jeremy Jackson | 4bf6461 | 2009-01-21 14:15:44 -0500 | [diff] [blame] | 15 | SUFFIXES = .png .eps .dia .pdf |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 16 | DIATOPNG = dia -t png -e |
| 17 | DIATOEPS = dia -t eps -e |
Paul Jakma | 5bc52c7 | 2009-06-22 16:11:06 +0100 | [diff] [blame] | 18 | PNGTOEPS = convert -antialias -contrast -despeckle |
Paul Jakma | ab2416a | 2006-04-03 21:24:27 +0000 | [diff] [blame] | 19 | PNGTOPDF = $(PNGTOEPS) |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 20 | EPSTOPDF = epstopdf |
| 21 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 22 | # The figure sources |
| 23 | figures_names_parts = -normal-processing -rs-processing \ |
| 24 | _topologies_full _topologies_rs |
Jeremy Jackson | 4bf6461 | 2009-01-21 14:15:44 -0500 | [diff] [blame] | 25 | figures_sources = $(figures_names_parts:%=fig%.dia) |
| 26 | figures_png = $(figures_names_parts:%=fig%.png) |
| 27 | figures_pdf = $(figures_names_parts:%=fig%.pdf) |
| 28 | figures_eps = $(figures_names_parts:%=fig%.eps) |
| 29 | figures_txt = $(figures_names_parts:%=fig%.txt) |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 30 | |
| 31 | # rather twisted logic because we have to build PDFs of the EPS figures for |
| 32 | # PDFTex and yet build one PDF, quagga.pdf, from texi source. Which means we |
| 33 | # cant rely on a single automatic rule for *.pdf, eg the one automatically |
| 34 | # provided by automake. If you are an automake wizard, please feel free to |
| 35 | # compact it somehow. |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 36 | |
| 37 | # Built from defines.texi.in |
paul | d9905f0 | 2005-04-05 08:04:18 +0000 | [diff] [blame] | 38 | BUILT_SOURCES = defines.texi |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 39 | |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 40 | info_TEXINFOS = quagga.texi |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 41 | |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 42 | # Have to manually specify the quagga.pdf rule in order to allow |
| 43 | # us to have a generic automatic .pdf rule to build the figure sources |
paul | d9905f0 | 2005-04-05 08:04:18 +0000 | [diff] [blame] | 44 | # because it cant just work from the png's directly it seems - contrary |
| 45 | # to the documentation... |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 46 | quagga.pdf: $(info_TEXINFOS) $(figures_pdf) |
paul | 649e853 | 2005-04-28 18:21:15 +0000 | [diff] [blame] | 47 | $(TEXI2PDF) -o "$@" $< |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 48 | |
paul | 5282d6e | 2003-08-13 04:55:13 +0000 | [diff] [blame] | 49 | quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 50 | ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \ |
paul | e050db2 | 2004-11-08 16:28:39 +0000 | [diff] [blame] | 51 | protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi \ |
Paul Jakma | ab2416a | 2006-04-03 21:24:27 +0000 | [diff] [blame] | 52 | vtysh.texi routeserver.texi defines.texi $(figures_png) snmptrap.texi \ |
| 53 | $(figures_txt) |
paul | 6a22b1f | 2004-11-07 19:39:13 +0000 | [diff] [blame] | 54 | |
Jeremy Jackson | 4bf6461 | 2009-01-21 14:15:44 -0500 | [diff] [blame] | 55 | .png.eps: |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 56 | $(PNGTOEPS) $< "$@" |
| 57 | |
Jeremy Jackson | 4bf6461 | 2009-01-21 14:15:44 -0500 | [diff] [blame] | 58 | .png.pdf: |
Paul Jakma | ab2416a | 2006-04-03 21:24:27 +0000 | [diff] [blame] | 59 | $(PNGTOPDF) $< "$@" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 60 | |
Jeremy Jackson | 4bf6461 | 2009-01-21 14:15:44 -0500 | [diff] [blame] | 61 | .dia.png: |
paul | bbd938e | 2005-04-02 10:18:42 +0000 | [diff] [blame] | 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 | a47d98f | 2005-04-02 18:53:00 +0000 | [diff] [blame] | 68 | mpls/opaque_lsa.txt mpls/ospfd.conf \ |
Paul Jakma | ab2416a | 2006-04-03 21:24:27 +0000 | [diff] [blame] | 69 | $(figures_sources) $(figures_png) $(figures_txt) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 70 | |
Andrew J. Schorr | 54afb65 | 2007-03-21 21:03:44 +0000 | [diff] [blame] | 71 | draft-zebra-00.txt: draft-zebra-00.ms |
| 72 | groff -T ascii -ms $< > $@ |