2004-11-07 Paul Jakma <paul@dishone.st>

	* Makefile.am: Add automatic rule to build pdf's from eps figures.
	  Clean *.pdf. Add rule for quagga.pdf (as the eps.pdf pattern
          probably otherwise will override automake's rule for quagga.pdf)
	* overview.texi: URL was causing TeX overfull, put on newline.
	* quagga.texi: Put the copyright notice into @copying section, as
	  is proper. Strip trailling space from the main menu lines.
	* rip(ng)?d.texi: Minor reformatting.
	* Add the route server docs.
	* bgpd.texi: remove unneeded page breaks. The 6Bone example
          overflows though.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 916450f..bcf55e2 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,13 +1,41 @@
 ## Process this file with automake to produce Makefile.in.
 
+EPSTOPDF = epstopdf
+
+# rather twisted logic because we have to build PDFs of the EPS figures
+# and yet build one PDF, quagga.pdf, from texi source. Which means we cant
+# rely on a single automatic rule for *.pdf.
+# If you are an automake wizard, please feel free to compact it somehow.
+#figures_pdfs = Normal-Announcement-processing.eps \
+#	       RS-Announcement-processing.eps \
+#	       topologias_full.eps topologias_rs.eps 
+
+# Built from defines.texi.in
+BUILT_SOURCES = defines.texi
+
 info_TEXINFOS = quagga.texi
 
-BUILT_SOURCES = defines.texi
+CLEANFILES = *.pdf
+
+# The figure sources
+figures_SOURCES = fig-normal-processing.eps \
+		  fig_topologies_full.eps \
+		  fig-rs-processing.eps \
+		  fig_topologies_rs.eps
+
+# Have to manually 		  
+quagga.pdf: quagga.texi \
+            fig-normal-processing.pdf fig_topologies_full.pdf \
+	    fig-rs-processing.pdf fig_topologies_rs.pdf
+	$(TEXI2PDF) -o "$@" $(info_TEXINFOS)
 
 quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \
 	ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \
 	protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi vtysh.texi \
-	defines.texi
+	defines.texi $(figures_SOURCES)
+
+%.pdf: %.eps
+	$(EPSTOPDF) --outfile="$@" $<
 
 man_MANS = vtysh.1 bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8